I am using the insert() function from Zend_Db_Table_Abstract.
The data being inserted is user input, so naturally I am curious if ZF does the data cleansing for me, or if I should do it myself before I call the insert() function.
I am using the insert() function from Zend_Db_Table_Abstract.
The data being inserted is user input, so naturally I am curious if ZF does the data cleansing for me, or if I should do it myself before I call the insert() function.
Use quoting (quote()
, quoteInto()
) with Zend_Db_Table
: insert
(no), update
(yes), delete
(yes), querying with SQL using the adapter directly (yes). Use quotes with Zend_Db_Table_Select
(usually not); make sure you examine the output of the query.
Here's a great answer from one of the authors of Zend_Db (http://stackoverflow.com/questions/975009/avoiding-mysql-injections-with-the-zend-db-class/985316#985316).