Re: Problem with mysql_real_escape_string

From: Date: Thu, 05 Mar 2009 20:32:38 +0000
Subject: Re: Problem with mysql_real_escape_string
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-289397@lists.php.net to get a copy of this message
On Thu, Mar 5, 2009 at 3:29 PM, Nigel Green <nigel@greenlemur.com> wrote: > On 05/03/09, Eric Butera wrote: > >> Make sure to always pass your active database connection into the >> second parameter of mysql_real_escape_string.  There could be >> character set differences between your two servers too that might be >> causing issues for you.  If at all possible I would recommend >> upgrading to mysqli or pdo and use prepared statements. > > Thanks for the replies. I've reworked the database code to use PDO prepared > statements and it works perfectly on the local and remote versions. Thanks! > > Nigel > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Really? Awesome! Thank you. :D -- http://www.voom.me | EFnet: #voom

« previous php.general (#289397) next »