select * from file_categories where (public=1) order by n asc , id asc limit 0, 20
link: Resource id #23
Unknown column 'n' in 'order clause'