Wednesday, 17 October 2012

How do you protect your site from sql injection in zend when using select query? | Zend Framework Interview Questions

You have to quote the strings,
$this->getAdapter ()->quote ( <variable name> );
$select->where ( ” <field name> = “, <variable name> );
OR (If you are using the question mark after equal to sign)
$select->where ( ” <field name> = ? “, <variable name> );

No comments: