Re: Automatically Escape?

From: Date: Tue, 16 Nov 2004 15:00:32 +0000
Subject: Re: Automatically Escape?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-202159@lists.php.net to get a copy of this message
GH wrote:
---------- Forwarded message ---------- From: GH <garyhotko@gmail.com> Date: Tue, 16 Nov 2004 08:45:08 -0500 Subject: Re: [PHP] Automatically Escape? To: Jordi Canals <jcanals@gmail.com> What is the Diffrencce between mysql_escape_string and mysql_real_escape_string?
the *_real_* one takes into account charset of the current connection, as mentioned in the manual
On Tue, 16 Nov 2004 14:34:43 +0100, Jordi Canals <jcanals@gmail.com> wrote:
On Tue, 16 Nov 2004 12:33:15 +0000, Richard Davey <rich@launchcode.co.uk> wrote:
G> Is there a function that can automatically escape special characters G> before putting them into mySQL? See magic_quotes to have it done for you. Although this isn't a recommend approach if you plan to distribute your application, in which case mysql_escape_string() is the one.
Just a comment : Note: This function (mysql_escape_string) has been deprecated since PHP 4.3.0. Do not use this function. Use mysql_real_escape_string() instead. So, if you're coding new scripts is better to use mysql_real_escape_string(). Best regards, Jordi.


« previous php.general (#202159) next »