PHP mySQL - table of images

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Not sure is best place to ask, but...
What should the mySQL table look like to save and extract a series of
I want to "insert" an image by name (string) and later "select" and send it
to a web page.



Re: PHP mySQL - table of images

the table should be reasonably simple, just 3 columns:

image_id (auto incrementing integer)
image_name (string of pre-determined length)
image_url (absolute or referential, either way this would be a
string... be sure to give it plenty of room though!)

That should be all you need... if you are finding yourself needing yet
more information at a later date, columns are easily added to existing
records.  this method should allow you to retrieve the image url by
referring either the image_id or the image_name

Re: PHP mySQL - table of images

I noticed that Message-ID: contained the following:

Quoted text here. Click to load it

Short description (useful to automatically add the alt="" attribute) and
long description are useful too.

Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs /

Site Timeline