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 ') or (b.part_on=1 and b.mid=)) ORDER BY sord' at line 5

SELECT id
FROM set_over_modules a
INNER JOIN set_over_menu b ON (a.id=b.part_id)
WHERE a.part_id=3 and
((a.del=0 and b.part_on<>2 and b.mid=)
or (b.part_on=1 and b.mid=))
ORDER BY sorder

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 del=0 and langid=0' at line 1
select body from art where mid= and del=0 and langid=0