select * from gallerie where photosid = #pid# select * from gallerie