Odp: [PHP-DB] Suggest Table Structure

From: Date: Thu, 05 Jul 2001 11:37:30 +0000
Subject: Odp: [PHP-DB] Suggest Table Structure
Groups: php.db 
Request: Send a blank email to php-db+get-10071@lists.php.net to get a copy of this message
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@hotmail.com> To: <php-db@lists.php.net> 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@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- Jeździsz konno? Ten konkurs jest dla Ciebie! [ http://konkursy.onet.pl/emarket2/ ]

« previous php.db (#10071) next »