World of flowers crafts manufacture wholesale export

select p.*, c.cname, as sname, as clname from products p left join categories c on p.mcategory=c.cid left join sdg_sections s on left join sdg_collections cl on where p.mstatus=0 and p.is_oem_item=0 and psystem=0 and s.status=0 and c.cstatus=1 and (cl.redirect_option=0 or (cl.redirect_option=1 and cl.redirect_url=''))'17' order by desc

Array ( [0] => 42000 [1] => 1064 [2] => 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 ''17' order by desc' at line 9 )