note 78701 deleted from security.database by felipe
| From: | felipe@php.net | Date: | Sun, 16 Dec 2007 11:45:53 +0000 |
| Subject: | note 78701 deleted from security.database by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133675@lists.php.net to get a copy of this message | ||
Note Submitter: Queue
Reason: 1
----
Unportable, but a quick guard against SQL injection with MySQL is to simply hex-encode:
$sql = "insert into foo select 'hello' , 0x68656c6c6f , 0x"
. bin2hex($_REQUEST['bar'])
. ";"
;
etc, etc.