Zend_Framework and security
In Dave Power's fantastic introductory book, ADOBE Dreamweaver, Training From the Source, I got a great intro using the Zend Framework to access my database. One issue that I'm now beginning to think about is Security and SQL injection. I've heard that using Zend eliminates the risk of sql injection, but it would be great to have a better understanding as to why it's not an issue using the Zend Framework. A typical query that I use in my site might look like:
$dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
$sql = "SELECT *
FROM questions
WHERE author_id = $user_id OR
public_access = 'Yes'";
return $read->fetchAll($sql);
where my $read has my database info.
Thanks!
-Eric
