Could not execute query SELECT pww_quest_name_en as name, quest_short_descr_en as descr, quest_restrictions_en as restrictions, quest_lvls as lvls, quest_type as type, quest_party_type as p_type, qp_is_daily as is_daily, pww_name_en as npc_name FROM quests LEFT JOIN quests_props ON qp_id = quest_id LEFT JOIN npcname ON quest_contact_npc_id = id WHERE quest_contact_npc_id = AND quest_step = 1 ORDER BY quest_lvl_min ASC, pww_quest_name_en ASC : 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 quest_step = 1 ORDER BY quest_lvl_min ASC, pww_quest_name_en ASC' at line 13