2009年4月2日星期四

Re: [fw-db] select->from($table...) has a different schema from the default db adapter's

Does setting the schema in the table definition not do this for you?

http://framework.zend.com/manual/en/zend.db.table.html
Example 13.78. Declaring a table class with schema or
Example 13.79. Declaring table and schema names upon instantiation

Never tried it myself but it ought to work.

sri2php wrote:
>
> $tableObj = new $table;
> $select = $tableObj->select();
> $select = $select->from($table, array("$attributeName"))
> ->where("$attributeId = '$id'");
>
> However, $table->_schema is different from default db set in the default
> db adapter.
> How can we force the generated SELECT statements to have schemas prepended
> to their table names?
>
>

--
View this message in context: http://www.nabble.com/select-%3Efrom%28%24table...%29-has-a-different-schema-from-the-default-db-adapter%27s-tp22829446p22845222.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: