I am using key
as a column name in a MySQL table.
Since this is reserved, it needs to be escaped properly to be used in a query:
… WHERE `key` = 'test'
Manually this is no problem, but I am using the Zend Framework and want to have it handle the escape correctly, like this:
$table = new Application_Model_ATable();
$table->fetchRow ( $table->select()->where('key = ?','test') );
So the question is:
How to quote/escape column names with Zend_Db_Table?
avoiding MySQL injections with the Zend_Db class
The guy explains it here actually but ill just pull out the quote quickly...
Hope this helps!!