Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 25th, 2004, 06:02 PM
g18c g18c is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 g18c User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Order status - pending, completed etc

Hi, i have a newbie question so your kindness would be much appreciated!

I have a question relating to orders. For my database i will have a number of states, ranging from when a customer initially places an order, to the order being assigned to a customer sales representative, then a completed state.

Is it better to store a 'state' ie order_pending, order_complete enum type in a database, or is it better to have seperate tables for different states (ie pending table, completed table)? I have been thinking that the state flag idea would be the best of the two, but expert opinion would be great or perhaps some other recommendations for my problem?

Many thanks,

Chris

Reply With Quote
  #2  
Old September 17th, 2004, 10:44 PM
CeCi CeCi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 11 CeCi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 6 m 33 sec
Reputation Power: 0
Can't you just have a field name 'state'. In it you store any of the 3 states. Like 'rececived', 'Pending' or 'Processed'. That way you could do many things with it. For example, if($row['state'] == 'Pending') {
echo 'order pending';}

I am kind of tired, I will come back to this later.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Order status - pending, completed etc


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway