José de Menezes Soares Neto wrote:
Friends,
I have three tables:
page
page2tag
tag
page2tag just have page_id and tag_id relationship...
how to build a query looking inside page, but merging the three tables?
regards,
josé
Use joins. Zend_Db_Table_Select has methods to conveniently join tables.
You could try something like:
|$select = $db->select()
||>from( array('p' => 'page'),
array('fieldname) )
->join(array('pt'=>'page2tag'),
'on condition')
-join(array('t'=>'tag'),
'on condition');|
http://framework.zend.com/manual/en/zend.db.select.html
Regards,
--
With warm regards,
Sudheer. S
Business: http://binaryvibes.co.in, Community http://lampcomputing.com,
Personal: http://sudheer.net