Re: PEAR DB Error Messages

From: Date: Tue, 11 Mar 2003 21:30:26 +0000
Subject: Re: PEAR DB Error Messages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4168@lists.php.net to get a copy of this message
All the apostrophes where escaped because I was trying to see if that was the problem using addslashes(). The form is coming from a HTML_QuickForm form and I have tried using the $form->applyFilter('headline', 'addslashes'); but this does not seem to help. hmmm... On Tuesday, March 11, 2003, at 04:24 PM, James 'Chip' Kaufman wrote:
On Tuesday 11 March 2003 03:08 pm, Charles Kline wrote:
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\'
At first glance, I don't know why all the apostrophe's were escaped with backslashes. I would have expected to see: 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' The headline value contains multiple words with spaces between. You HAVE to surround that with quotes or apostrophes. --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 (#4168) next »