Jump to content

images in a MySQL database


huntrguy102

Recommended Posts

so each image is associated with a book so you need the path to the image in the database in a field with the book entry

 

Then you for example:

 

///$site_url is the full path of your domain
$sql = "SELECT url WHERE book_id = '$book_id'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
echo $site_url.'/images/'.$row['url'];

 

something like that

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.