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 visible<>0' at line 3
SELECT * FROM aw_menu 
			LEFT JOIN aw_meta USING(main_id)
		WHERE aw_menu.main_id= AND visible<>0