note 55797 deleted from function.mysql-real-escape-string by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Mar 2009 15:10:41 +0000 |
| Subject: | note 55797 deleted from function.mysql-real-escape-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151942@lists.php.net to get a copy of this message | ||
Note Submitter: matthew at exanimo dot com
----
Note that to use quote_smart(), you have to connect to the database via mysql_connect(). Otherwise,
mysql_real_escape_string() will have no way of knowing what database you want to use.
If you want to use the OO approach or mysqli_connect(), you're going to have to rewrite
quote_smart() to accept a MySQL connection, which it would then pass to mysql_real_escape_string().
This is a pretty lackluster solution, though, for anyone concerned with abstraction.