Tænke mere på hvordan man lavet alle properties på varen smartest, så man kunne søge i dem, etc et tv og en bil har ikke samme egenskaber.
så det skal dele ud i nogen flere tabeller.
skulle nok ha forklaret mig lidt bedre

sådan lige hurtigt, noget i den her stil..
- delimiter $$
-
- CREATE TABLE `shop_items` (
- `item_id` int(11) NOT NULL AUTO_INCREMENT,
- `active` int(1) NOT NULL,
- `owner` int(11) NOT NULL,
- PRIMARY KEY (`item_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1$$
-
- CREATE TABLE `shop_items_properties` (
- `properties_id` int(11) NOT NULL AUTO_INCREMENT,
- `properties_title` varchar(45) NOT NULL,
- PRIMARY KEY (`properties_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1$$
-
- CREATE TABLE `shop_items_properties_relation` (
- `item_id` int(11) NOT NULL,
- `properties_id` int(11) NOT NULL,
- `properties_value` varchar(45) NOT NULL,
- PRIMARY KEY (`item_id`,`properties_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1$$
Indlæg senest redigeret d. 11.09.2011 19:41 af Bruger #3427