select * from metas M join metas_programs MP on MP.meta_id = M.meta_id where program_id = order by MP.meta_order, M.meta_labelYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by MP.meta_order, M.meta_label' at line 4