Re: Comments on PHP security
| From: | Tim Starling | Date: | Fri, 12 Jan 2007 16:58:24 +0000 |
| Subject: | Re: Comments on PHP security | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27403@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
> Wow, that's hideous!
Only because I chose a complex example, to demonstrate its capabilities.
It's a great deal easier than the equivalent string wrangling. SQL is
meant to be human readable. It's not particularly well-suited to
construction from PHP data types, or to parsing for that matter.
A simple example might be:
$count = $db->selectField('page', 'page_title', array('page_id'
=> $id));
-- Tim Starling