Re[2]: [PEAR] Native Error 1064 with PEAR DB and mysql

From: Date: Fri, 20 Sep 2002 11:50:16 +0000
Subject: Re[2]: [PEAR] Native Error 1064 with PEAR DB and mysql
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2356@lists.php.net to get a copy of this message
Henrik, I don't think you need to quote the Select statement - as I can see in the error message you have two single quotes at beginning and end of the statement. I think the lihe $psql = $db->quote($sql); is unnecessary since it might quote (sorry, I don't know the latest semantics of the Db class) the SQL statement. Try to eliminate this line. Hope it helps, Stanislav HK> On Fri, 20 Sep 2002, Stanislav Okhvat wrote: >> Do you really have to quote table "person" in the SQL statement. I >> don't think this is necessary and phpMyAdmin could handle the issue >> while PEAR doesn't. Try it without the quotes. HK> I've tried that but it doesnät help. The error is still there: HK> ******** HK> 'SELECT personID, firstname, surname, title FROM person WHERE personId>0 HK> ORDER BY surname' [nativecode=1064 ** You have an error in your SQL syntax HK> near ''SELECT personID, firstname, surname, title FROM person WHERE personId>>0 ORDER B' at line 1] HK> DB Error: syntax error HK> ******** HK> -- HK> Henrik Karlsson | www.henriks.org HK> Studying Automation Engineering | ICQ: UIN 2785561 HK> at Chalmers University of Technology | +46-707-99 50 31 HK> "Coughlin's law - anything else is always something better." Best regards, Stanislav mailto:stanis@sibfair.nsk.su

« previous php.pear.general (#2356) next »