Re: mysql_real_escape_string paranoid enough?

From: Date: Sat, 21 Mar 2009 22:29:03 +0000
Subject: Re: mysql_real_escape_string paranoid enough?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-290509@lists.php.net to get a copy of this message
On Fri, 20 Mar 2009 09:49:23 -0700, mike wrote: > Slightly off topic here, but I find it annoying to have to use the > connection identifier for the mysqli_real_escape_string. > > It would be great if there was a function that I could say > mysql_escape_string that is using utf-8 instead of default, as opposed > to having to use mysqli_real_escape_string. I think mysql_escape_string() should work fine with utf-8, except that it is being deprecated in 5.3.0. <http://se2.php.net/manual/en/function.mysql-escape-string.php> I tend to use the escape functions in very close proximity to the actual query, so I don't see a problem with supplying a connection identifier. /Nisse

« previous php.general (#290509) next »