【发布时间】:2013-09-20 15:35:33
【问题描述】:
我已经使用 Drupal 7 中的简单查询完成了我的数据库操作。但是我想要一些使用 Drupal 7 theme_table 的分页功能,因此我必须使用 Drupal 7 db_select ,但我不能这样做。
请尽快帮助我,下面是我要在db_select中转换的mysql查询:-
SELECT r.ROName, CONCAT(CONCAT(CONCAT(r.Address1, ' - ' , r.Pincode),' - ',d.Distname),' - ',s.StateName) as Address1,r.Phone1, r.Phone2, r.Fax, r.Phone3, r.Pincode, r.DistID,d.Distname, d.DistID, s.StateID, r.StateID, s.StateName
FROM ROMaster r
JOIN DistrictMaster d ON r.DistID = d.DistID JOIN StateMaster s ON r.StateID = s.StateID
WHERE SBUID =1
ORDER BY r.ROName
【问题讨论】: