Re: Using mysql_real_escape_string without connecting to mysql

From: Date: Wed, 23 Jan 2008 19:41:52 +0000
Subject: Re: Using mysql_real_escape_string without connecting to mysql
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-267922@lists.php.net to get a copy of this message
> > It would be Real Nifty (tm) if the MySQL API had a function that let > > you specify the charset without a connection and did the escaping. > > > > Presumably you don't NEED a connection if you already know what > > charset thingie you are aiming at... I concur - it would be nice to have the capability to have a normal string escape function and give it a character set. I mean we should all be using utf-8 anyway, right? Right now I still use mysql_escape_string and it seems to work fine, but it makes me nervous as everything else I use is mysqli and I know it is not 100% compatible (just haven't had anything break it yet) - but I hate having to have a connection handle open just to escape things.

« previous php.general (#267922) next »