MySQL error 1064 from query with clauses out of order in CodeIgniter script
I want to join a pages table and menu table. I have errors with the following SQL. function generateTree(&$tree, $parentid = 0) { $res = $this->db->query('SELECT M.*, P.name AS PageName WHERE M.parentid = $parentid ORDER BY M.order asc, M.parentid asc FROM menus AS M LEFT JOIN pages AS P ON P.id = M.page_id'); // ... } Can you tell what I am doing wrong?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.