SQL woes (newbie question) - PHP 4.3.6 & ADOdb

From: Date: Tue, 27 Apr 2004 19:43:07 +0000
Subject: SQL woes (newbie question) - PHP 4.3.6 & ADOdb
Groups: php.general 
Request: Send a blank email to php-general+get-184795@lists.php.net to get a copy of this message
I seem to be having some trouble getting my SQL statement to work properly. I'm trying to get it so that I can have any text between the single quotes. So as you can see below, if the text that needs to get updated has a single quote in it, I get an error when trying to execute the statement. The database I'm using is Access, the field type is "memo", and I'm using the ADOdb library. In my example below I'm using a really short string. But in actuality it could be *extrememly* long, and would contain HTML code (thus there would be many single quotes and double quotes). Any ideas so that I can get anything between the single quotes to be seen as text to be updated and not something to be processed? I've tried using double quotes and backticks instead of the single quotes around the text. UPDATE tblFAQ_Question SET fldBody = '<span style='color: #000000;'>hi, what's going on?</span>' WHERE autoQuesID = $intQuestionID; Thanks! Gabe

« previous php.general (#184795) next »