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