Re: PEAR DB Error Messages

From: Date: Tue, 11 Mar 2003 21:08:55 +0000
Subject: Re: PEAR DB Error Messages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4166@lists.php.net to get a copy of this message
This was what I was looking for, but I have no idea what the problem here is: [nativecode=1064 ** You have an error in your SQL syntax near '\'a test that didn\'t work?\',contact=1521174882,area_1=8,area_2=5,area_3=0,area' at line 1] Here is the echo of the sql string: UPDATE tbl_funding SET headline=\'a test that didn\'t work?\',contact=1521174882,area_1=8,area_2=5,area_3=0,area_4=0,area_5=0,description=\'test\',body=\'test\',showemail=1,doc_name=\'test.doc\' Any ideas? On Tuesday, March 11, 2003, at 03:58 PM, James 'Chip' Kaufman wrote:
On Tuesday 11 March 2003 02:34 pm, Charles Kline wrote:
Is there a way to get a better idea of what kind of error is happening and why besides the one I am getting now that is: DB Error: syntax error Thanks, Charles
I do this:
    if (DB::isError($res)) {
        die ($res->getDebugInfo() . " at line " . __line__ );
    }
It will give an informative error message and your query. You could cut and paste the query into your command line SQL program and see what the db says. --James 'Chip' Kaufman jkaufman@wamnet.com PGP key: 697D43DE --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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