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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -