ZF-9017: Zend_Db_Select does not prepend the schema name to the table name following the SELECT clause
I've personally only tried this when querying a MS SQL Server 2005 database.
Zend_Db_Select fails to add the schema name to the table name when querying a table in the database that has a schema other than the default. So, the following code:
$select = $db->select()->from('my_schema.my_table_name'); $stmt = $select->query(); $result = $stmt->fetchAll();
Will have generated a SQL string that looks something like:
SELECT "my_table_name".* FROM "my_schema"."my_table_name"
SELECT "my_schema"."my_table_name".* FROM "my_schema"."my_table_name"
As it currently stands the SQL Server returns an error, and an exception gets thrown. I've been able to update Zend_Db_Select::_renderColumns such that the schema name is prepended to the table name after the SELECT clause, and it works for my purposes, though I am not familiar enough with the code to know if it will work for everyone all the time.