[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] about "Replaced several prepare()/execute()/finish() sequen
From: |
paul POULAIN |
Subject: |
[Koha-devel] about "Replaced several prepare()/execute()/finish() sequences with do()." |
Date: |
Mon Oct 7 02:28:02 2002 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
Just 1 remark about few of your CVS commits :
we have decided to use
prepare("update xx where yy=?");
execute($yy_value);
If there are
prepare("update xx where yy=$yy_value")
execute();
then it's because nobody moved this query to ? syntax.
Thus,
- $query = "insert into biblio set
- biblionumber = $bibnum,
- title = $biblio->{'title'},
- author = $biblio->{'author'},
- copyrightdate = $biblio->{'copyright'},
- serial = $series,
- seriestitle = $biblio->{'seriestitle'},
- notes = $biblio->{'notes'},
- abstract = $biblio->{'abstract'}";
! $sth = $dbh->prepare($query);
! $sth->execute;
should be
$query = "insert into biblio set
biblionumber = ?
title = ?
author = ?
copyrightdate = ?
serial = ?
seriestitle = ?
notes = ?
abstract = ?";
$sth = $dbh->prepare($query);
$sth->execute($bibnum,$biblio->{'title'},...);
and not
! $dbh->do(<<EOT);
! INSERT INTO biblio
! SET biblionumber = $bibnum,
! title = $biblio->{'title'},
! author = $biblio->{'author'},
! copyrightdate = $biblio->{'copyright'},
! serial = $series,
! seriestitle = $biblio->{'seriestitle'},
! notes = $biblio->{'notes'},
! abstract = $biblio->{'abstract'}
! EOT
--
Paul
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-devel] about "Replaced several prepare()/execute()/finish() sequences with do().",
paul POULAIN <=