Zend_Db_Table_Rowset: how to get table info (metadata) when using JOINS?
I was wondering if anyone knew how to get the metadata info from a Zend_Db_Table_Rowset class when using joins in the query that produced that result set? It's easy when there are no joins involved.. for example:
foreach ($rowset as $row) {
$info = $row->getTable()->info(Zend_Db_Table_Abstract::METADATA);
Zend开发者_如何学C_Debug::dump($info); // outputs array of column info including data type
}
But when I do that to a row that came from a query using joins I just get the data from the main table I was selecting from..
Jose, what kind of metadada info do you need? Maybe there is an alternate way to achieve what you want. Since the joins are always done from one table (and you join it to others) I think you will always get the metadata info for the first one.
By any chance are you doing dynamic joins?
精彩评论