Zend_Db_Table fetchAll and column names
I'm testing Zen_DB and Zend_DB_Table and I'm facing a problem:
Let's say I've got two tables
table A(id, title) table B(id, title)If I write something like
$db = $this->getDbTable()->getAdapter();
$query = "SELECT A.*, B.* FROM A INNER JOIN B on A.id = B.id"
$stmt = $db->query($query);
$rows = $stmt->fetchAll();
each resulting row is like ['id' => value, 'title' => value]
Question: How can the fetched rows be like ['A.id' => value, 'A.title' => value', 'B.id' => value, 'B.title' =>开发者_如何学C value'] ?
Important: I don't want to modify the database schema
Your question was answered by this question
精彩评论