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