php - Select 3 tables in zend -
i'm new in zend. in model default_model_applicationmapper, wanna use db-table application_model_dbtable_application run query that
"select * application a, category c, user u a.user_id = u.id , a.category_id = c.id";
i tried this:
$table = new application_model_dbtable_application(); $select = $table->select()->from(array('a' => 'application')) ->from(array('c' => 'category')) ->from(array('u' => 'user')) ->where('a.user_id = u.id , a.category_id = c.id');
of course thing not work. can me this?
instead of using from(array('a' => 'table'))
3 times, try using from(array('a' => 'table1', 'b' => 'table2', 'c' => 'table3'))
.
Comments
Post a Comment