On Thu, Mar 27, 2003 at 09:03:42PM +0000, Thien Ho said:
Hello,
In Koha-1.2.3, module/C4/Search.pm, line 4 of function ItemInfo: what is the meaning of the question mark? Is it intentional or mistake? I get some wrong result if I leave the question mark there. I fixed it by replacing the "?" by "$biblionumber".
Hi It is intentional. my $query = "SELECT * FROM items, biblio, biblioitems WHERE items.biblionumber = ? AND biblioitems.biblioitemnumber = items.biblioitemnumber AND biblio.biblionumber = items.biblionumber"; Is the bit of code eh? You'll notice that a bit further down there is a line $sth->execute($biblionumber); Which substitutes the $biblionumber to where the ? is. Why do it this way, because this way the DBI module will escape any bad characters we may have in the variable. I hope this helps Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz