note 53739 rejected from function.mysql-real-escape-string by mazzanet

From: Date: Sat, 11 Jun 2005 08:02:22 +0000
Subject: note 53739 rejected from function.mysql-real-escape-string by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-90253@lists.php.net to get a copy of this message
Note Submitter: ivanhoe011 at gmail dot com ---- MySQL manual says for mysql_real_escape_string() function: "Strictly speaking, MySQL requires only that backslash and the quote character used to quote the string in the query be escaped. This function quotes the other characters to make them easier to read in log files." Based on this I'm a bit susspicious if "best practice" approach is really needed when working with plain strings...using magic quotes, then doing stripslashes, and then again mysql_real_escape_string() seems pretty much like doing the same thing twice, and only benefit seems to be having (mysql) log files more readable?

« previous php.notes (#90253) next »