A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND mi.drink_menu_size = ms.id AND ms.size = s.id ' at line 6

SELECT m.*,i.path,s.name as size,mi.drink_menu_size FROM a_menu_include as mi,a_menu_size ms, a_size as s,a_menu as m LEFT JOIN a_image as i ON m.id = i.menu AND i.type='drink' AND i.status='1' WHERE 1=1 AND ms.status='1' AND s.status='1' AND mi.status='1' AND m.status='1' AND mi.menu_size = AND mi.drink_menu_size = ms.id AND ms.size = s.id AND ms.menu = m.id ORDER BY s.id asc

Filename: /home/2/p/pepinos/www/models/product_model.php

Line Number: 403