So i was planning my Application when i've encountered the following issue: i want to be able to make this query using Zend Db Select:
SELECT COLUMN_NAME
AS COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME
= 'brand'
AND TABLE_SCHEMA
= 'product'
that selects the colums from a table. The problem is that Zend generates:
SELECT COLUMN_NAME
AS COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME
= 'brand' AND TABLE_SCHEMA
= 'product'
with "``"(quotes) on INFORMATION_SCHEMA.COLUMS that produces a SQL error of "No database selected". I've tried to insert " 'platform_options' => array('quote_identifiers' => false)," in my configuration array but nothing happens. The code used to generate that is:
$sql = new Sql($this->adapter);
$select = $sql->select();
$select->columns(array('COLUMN_NAME'),false);
$select->from('INFORMATION_SCHEMA.COLUMNS');
$select->where(array('TABLE_NAME' => $table,'TABLE_SCHEMA' => $database));
$statement = $sql->prepareStatementForSqlObject($select);
var_dump($sql->getSqlStringForSqlObject($select));