SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and p.publish_flag='y' and s.publish_flag='y' and s.order_id >= 0 group by s.sec' at line 1\b

Original query: select * from section s, page p, section_pages sp where s.section_id=sp.section_id and p.page_id=sp.page_id and sp.partner_id= and p.publish_flag='y' and s.publish_flag='y' and s.order_id >= 0 group by s.section_id order by s.order_id