Re:[3] [PHP-DB] MSSQL error codes :/

From: Date: Mon, 01 Oct 2001 19:41:01 +0000
Subject: Re:[3] [PHP-DB] MSSQL error codes :/
Groups: php.db 
Request: Send a blank email to php-db+get-12891@lists.php.net to get a copy of this message
Great sounds like a winner :) "Frank M. Kromann" <frank@frontbase.com> wrote on 10/1/2001 2:32:27 PM: > >Hi Charles, > >I useally disable all magic quotes in php.ini and handle everyting in my scripts. This way I >only get single quotes when I need them and I dont have to do a stripslashes() ! > >- Frank > >> "Frank M. Kromann" <frank@frontbase.com> wrote on 10/1/2001 1:42:02 PM: >> > >> >You should replace a single quote with a double qoute before inserting/updating values. >> > >> >$new_variable = str_replace("'", "''", $variable); >> > >> >will do the trick. >> > >> >- Frank >> > >> >> I'm getting funky error codes, even with doing addslashes($variable); but its >> >> not >> >> escaping the 's, I have even resorted to str_replace() and still nothing.... >> >> >> >> below is error output. >> >> Warning: MS SQL message: Line 1: Incorrect syntax near 'b'. (severity >> >> 15) in >> >> \jtron\home\admin\functions.php on line 82 >> >> >> >> Warning: MS SQL message: Unclosed quotation mark before the character >> >> string ')'. (severity 15) in \jtron\home\admin\functions.php on line 82 >> >> >> >> Warning: MS SQL: Query failed in \jtron\home\admin\functions.php on line >> >> 82 >> >> >> >> >> >> -- >> >> PHP Database Mailing List (http://www.php.net/) >> >> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >> >> For additional commands, e-mail: php-db-help@lists.php.net >> >> To contact the list administrators, e-mail: php-list-admin@lists.php.net >> >> >> >> >> >> >> >> well that works great, save for the fact that if you WANT /'s in there tho :/ because >> if you want to >> retain your single quotes without having a backslash in the code, you have to >> strtipslashes() if you dont >> want it to show up :-/ what a dillemma >> >> >>

« previous php.db (#12891) next »