2

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' => value'] ?

Important: I don't want to modify the database schema

Charles
  • 50,943
  • 13
  • 104
  • 142
thomas.g
  • 3,894
  • 3
  • 29
  • 36

1 Answers1

2

Your question was answered by this question

Community
  • 1
  • 1
Mark
  • 6,254
  • 1
  • 32
  • 31