i have these two tables ,
s(id,firstname,lastname,mydate,mount,sh)
users(uid,email,password,nameoffice)
and this query
$sql=”SELECT
s.id,s.firstname,s.lastname,s.mydate,s.mount,users.nameOffice
FROM sayer
LEFT JOIN users ON s.sh=users.sh order by date(s.mydate)
DESC,s.mount DESC”;
how could I write this query on zend framework?
One way would be as follows:
This results in:
For more have a look at Zend_Db_Select.