I've got a query which returns the orders by considering a condition on the column "maxvalue":
Mage::getModel('sales/order')->getCollection()->addFieldToFilter('maxvalue', 'bla')
It generates following invalid SQL :
SELECT `main_table`.* FROM `sales_flat_order` AS `main_table` WHERE (maxvalue = 'bla')
Since a mysql upgrade, "maxvalue" is a reserved keyword, it can not be left unquoted. So it must be:
... WHERE (`maxvalue` = 'bla')
... addFieldToFilter('`maxvalue`', 'bla')
Is it possible to set globally a kind of auto-column-name-quotation for the query builder?
UPDATE.. I'm using an extensioon which is ioncube-obfuscated, so there is no possibility to change the code. So I thought there would be another solution e.g. auto-quotation of field names by setting a global directive.