note 33272 added to security.database
| From: | jjahn at SPAMSUCKS dot signicast dot com | Date: | Fri, 20 Jun 2003 15:17:35 +0000 |
| Subject: | note 33272 added to security.database | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50754@lists.php.net to get a copy of this message | ||
I would say one of the best ways to guard against SQL injection is to use the excellent PEAR DB
package. If you prepare() and execute() your queries, PEAR will automagically addslashes and handle
the query depending on your RDBMS. And of course, for repeatable queries prepare and execute will
give you a bit of a readability and speed increase.
----
Manual Page -- http://www.php.net/manual/en/security.database.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33272
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33272&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33272&report=yes