select * from photos where passed=true and photobookid=27 order by orderid