Wednesday, August 30, 2006

php and pear::db

ah the joys of "DB Error: mismatch" when converting mysql specific code to pear::db. if you generate a querystring and intend to use it for both normal queries (e.g. getOne)
and prepared ones you might encounter a few surprises:
& and ! are special chars for prepare and need to be escaped. if you escape them however you can't use the same query for normal queries or you'll get a syntax error. no i need to escape those via a function prior to using them in a prepared query :/.

0 Comments:

Post a Comment

<< Home