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 `active` = 1
AND `level` = 0
AND `IDMenusSection` =
(SELECT `I...' at line 4 SELECT * FROM `menus`
WHERE `master` = 0
AND `IDLang` = 1/
AND `active` = 1
AND `level` = 0
AND `IDMenusSection` =
(SELECT `IDMenusSection` FROM `menussection`
WHERE `IDMenusSection` = "1")
ORDER BY `priority` DESC;