MySQL error: 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 leaders.type=0 ORDER BY pos ASC' at line 1 (SELECT account.avatar, CONCAT_WS(' ', person_sur, person_name, person_patr) AS name, leaders.* FROM leaders LEFT JOIN account ON account.id=leaders.account_id WHERE leaders.menu_id= AND leaders.type=0 ORDER BY pos ASC) MySQL error: 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 leaders.type=1 ORDER BY pos ASC' at line 1 (SELECT account.avatar, CONCAT_WS(' ', person_sur, person_name, person_patr) AS name, leaders.* FROM leaders LEFT JOIN account ON account.id=leaders.account_id WHERE leaders.menu_id= AND leaders.type=1 ORDER BY pos ASC) www.elamigocubano.com