[thelist] Query help?
Andrew Maynes
andrew at humanbehaviour.co.uk
Sun Feb 23 09:10:01 CST 2003
there isn't any relationship between the category and city tables, should there
be? here are the three tables.
# Table structure for table 'category'
#
CREATE TABLE category (
Category varchar(100) DEFAULT '' NOT NULL ,
CategoryID bigint(20) DEFAULT '' NOT NULL auto_increment,
PRIMARY KEY (CategoryID)
);
#
# Table structure for table 'city'
#
CREATE TABLE city (
City varchar(100) DEFAULT '' NOT NULL ,
CityID bigint(20) DEFAULT '' NOT NULL auto_increment,
PRIMARY KEY (CityID)
);
#
# Table structure for table 'items'
#
CREATE TABLE items (
ItemSKU varchar(25) DEFAULT '' NOT NULL ,
ItemName varchar(100) DEFAULT '' NOT NULL ,
ItemDescription mediumtext DEFAULT '' NOT NULL ,
PostCode varchar(100) DEFAULT '' NOT NULL ,
Category bigint(20) DEFAULT '0' NOT NULL ,
CityID bigint(20) DEFAULT '0' NOT NULL ,
CTelephone varchar(100) DEFAULT '' NOT NULL ,
ItemID bigint(20) DEFAULT '' NOT NULL auto_increment,
PRIMARY KEY (ItemID)
);>
Andrew
More information about the thelist
mailing list