php-db | 2001071
Date: 07/05/01
- Next message: Heilig Szabolcs: "[PHP-DB] mysql_change_user() missing?"
- Previous message: Roger Ramirez: "Re: [PHP-DB] Suggest Table Structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The best way is to create extra table storing only pictures:
CREATE TABLE PICS
ID_PICS int(x) NOT NULL auto_increment,
ID int(6) NOT NULL auto_increment [[foreign key from main table]]
PICTURE longblob,
Then you will be able to select pictures to certain article:
SELECT picture from PICS WHERE ID = 'give article ID'
Bartek Pawlik
Bimex-Boellhoff
----- Original Message -----
From: kachaloo <kachaloo <email protected>>
To: <php-db <email protected>>
Sent: Thursday, July 05, 2001 11:00 AM
Subject: [PHP-DB] Suggest Table Structure
> Hi guys,
> I am making a table which will store articles for a site
> and the feilds are :
>
> ID int(6) NOT NULL auto_increment,
> CATEORY varchar(10) NOT NULL DEFAULT 'EVENTS' ,
> HEADING varchar(30) NOT NULL DEFAULT '' ,
> BODY longblob ,
> PICTURE longblob ,
> KEYWORD varchar(30) NOT NULL DEFAULT '' ,
> FILENAME varchar(50) ,
> FILESIZE varchar(50) ,
> FILETYPE varchar(50) ,
> PRIMARY KEY (ID),
> UNIQUE ID (ID)
>
>
> But now I noticed some of the articles will have more than one
> picture... so how do I structure my table ?
>
> Thanks in advance,
> Vishal
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
--Je¼dzisz konno? Ten konkurs jest dla Ciebie! [ http://konkursy.onet.pl/emarket2/ ]
- Next message: Heilig Szabolcs: "[PHP-DB] mysql_change_user() missing?"
- Previous message: Roger Ramirez: "Re: [PHP-DB] Suggest Table Structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

