Load images from data base

Hi I am trying to load some images from a database.
I can pass a variable from flash to php, from php to db and back again.
this is no problem with dynamic text but I am not familiar with how images can be retrieved.

another fact is that the images are removed and re-entered every 24 hrs. and their instance names also change.
Is it posible to adapt flash in this way or would It be better try another form of coding for the job?