[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help with PHP/SQL

On Thu, May 13, 2004 at 09:58:35PM -0400, ziada Mrisho wrote:
> I got your e-mail address from a forum thread on SQL Help. I desperately need
> help for my class project. I need to know how to insert an image in a
> database table. When I issue a CREATE table command, what attribute
> represents an image file? eg:
> CREATE TABLE SClassTable (
>   ?image _________? NOT NULL,
>   description VARCHAR (64) DEFAULT NULL,
>   reference INT (5) DEFAULT NULL,
>   price VARCHAR(15),
>   PRIMARY KEY (reference),
>   KEY (description)

it's not a good idea to store images in databases.  you're much better off
storing the image in the filesystem and using the database to store metadata
about the image, including description, title, copyright details, and
especially the path and/or URL to the image.


craig sanders <cas@taz.net.au>

The next time you vote, remember that "Regime change begins at home"

Reply to: