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