mercredi 30 décembre 2015

Retrieve random image with its caption from a MySQL database

all.

I would like my script to select a random image from a database. Then, from the same database, select the caption that goes along with it (there is a separate 'caption' row).

My problem is that whenever 'caption' gets updated in the database, it isn't getting updated with the random image that is being shown on the web page.

Picture of database here

Yes, I know that uploading images into a database isn't the best practice, but right now, I'm in a 'whatever works, works' mode.

Thanks for the help!




Aucun commentaire:

Enregistrer un commentaire