Can't Query - SELECT spect.name_ru, roles.name_ru, spect.id, roles.about FROM roleact, roles, spect WHERE spect.oldyear='0' AND roleact.aid= AND roleact.rid=roles.id AND roles.sid=spect.id ORDER BY spect.name_ru, roles.priority