Users have rights to add custom delivery type, but for default types price must counts automatically. How I can do that? I have an idea to create much one table with itemId column and some BOOL column for storing flag (automatically it counts or no)deliveryType
id; INT PRIMARY KEY AUTO_INCREMENT
name; TINYTEXT
description; TEXT
itemId; INT
Table of delivery types in store
Moderator: General Moderators
Table of delivery types in store
Re: Table of delivery types in store
What?
If your problem is finding a way to distinguish default versus non-default delivery types then yeah, I'd probably go for a flag field too.
If your problem is finding a way to distinguish default versus non-default delivery types then yeah, I'd probably go for a flag field too.
Re: Table of delivery types in store
Asking for critique. I want to find out type of delivery using deliveryType.id and count a price of deliverydelivery
deliveryId; INT
itemId; INT
name; TINYTEXT
description; TEXT
deliveryType
id; INT PRIMARY KEY AUTO_INCREMENT
isAutomaticallyCount; BOOL
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Table of delivery types in store
Seems like it should be like this:
So you could: SELECT delivery.*,deliveryType.isAutomaticallyCount FROM delivery JOIN deliveryType ON delivery.deliveryTypeId=deliveryType.id WHERE deliver.id=42delivery
id; INT
deliveryTypeId; INT
itemId; INT
name; TINYTEXT
description; TEXT
deliveryType
id; INT PRIMARY KEY AUTO_INCREMENT
isAutomaticallyCount; BOOL
(#10850)