Turn on the magic_quotes_sybase setting in your php.ini file. Or, if you
prefer to do it manually, replace all single quotes in the fields with
two consecutive single quotes.

Andrian

Kelvin Luck wrote:
> 
> Hi,
> I am having trouble inserting single quotes into an mssql database... my
> queries are taking the form:
> 
> mssql_query("update discussiontopics set comment = '$comment', title =
> '$title', zoneid = $zoneID where topicid = $topicID");
> 
> If $comment or $title contain any single quote characters I get an sql
> error. I thought that addSlashes() was meant to avoid these problems but it
> hasn't helped me... Neither has quotemeta()... Are there any other hint's
> for inserting single quotes into mssql databases?
> tia,
> 
> Kelvin.
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to