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 'limit 0, 20' at line 1

select DISTINCTROW p.items_picture, p.items_quantity, pd.items_name, pd.items_name2, p.items_id, p.producers_id, p.items_price, p.items_tax_class_id, p.delivery_time_id, s.specials_new_items_price, s.expires_date from ((((items_description pd, items p) left join producers m on p.producers_id = m.producers_id, items_to_categories p2c) left join specials s on p.items_id = s.items_id) left join categories c on c.categories_id = p2c.categories_id) where c.categories_status = '1' and p.items_status = '1' and p.items_id = p2c.items_id and pd.items_id = p2c.items_id and pd.language_id = '5' and p2c.categories_id = '30' AND (to_days(items_date_available_end) IS NULL OR (to_days(items_date_available_end) IS NOT NULL AND to_days(now()) <= to_days(items_date_available_end))) order by limit 0, 20