Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP mySQL - table of images

gsb
Guest
 
Posts: n/a
#1: Jul 17 '05
Not sure is best place to ask, but...
What should the mySQL table look like to save and extract a series of
images.
I want to "insert" an image by name (string) and later "select" and send it
to a web page.

Thanks,

gsb



adam@adamcoppin.com
Guest
 
Posts: n/a
#2: Jul 17 '05

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

Geoff Berrow
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PHP mySQL - table of images


I noticed that Message-ID:
<1098928551.325015.286180@z14g2000cwz.googlegroups .com> from
adam@adamcoppin.com contained the following:
[color=blue]
>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[/color]

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 http://www.ckdog.co.uk/rfdmaker/
Closed Thread