Steve Grosz <[EMAIL PROTECTED]> wrote:
> I'm just getting into the whole MySql (was using access). Is it better
> to create a Blob type and insert a image into it, or to create a char
> file type and have a directory structure to the specific file?
It's FAQ. One of the most FA Q.
Store image
> What I need to know is:
> 1. what would the create table statment look like in Mysql.
DROP TABLE IF EXISTS pictures;
CREATE TABLE pictures (
id mediumint(4) NOT NULL auto_increment,
comment text NOT NULL,
width smallint(6) DEFAULT '0' NOT NULL,
height smallint(6) DEFAULT '0' NOT NUL
Thanks, regarding the PHP info.
What I need to know is:
1. what would the create table statment look like in Mysql.
2. Should I use a longblob based on my 100k .gif size?
3. Is one column with the gifs enough. Or should I add a autoincremented
primary key?
4. Is it better to have a seperat
Generally, it is not advised to add pictures to tables. See
http://www.bitbybit.dk/mysqlfaq/faq.html#storing_images
We had this question here some days ago, so it may ge a good idea
to discuss at length possible problems why people won't like this
approach of storing pics as files.
WARNING: thi