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