如何在Codeigniter框架中運行此sql查詢?使用Codeigniter中的嵌套連接
SELECT users.*,
GROUP_CONCAT(category.title SEPARATOR ',') as title
FROM users
LEFT JOIN (
procducts as pr
INNER JOIN category ON pr.category_id =category.id
)
ON (users.id=pr.user_id)
GROUP BY users.id
在笨的Active Record(查詢生成器類),而不使用db->query
[codeigniter表連接]的可能重複(http://stackoverflow.com/questions/6024800/codeigniter-table-join) –
@ hamza-zafee我在查詢問題之前看到此鏈接 – user3046493