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 'order by schools.name' at line 1
select schools.*, school_field.school from schools, school_field where schools.id = school_field.school and school_field.field= order by schools.name