Jump to content

big database table - better way?


Optimo

Recommended Posts

Hello, i am trying to create a system by which a user can set an order of units to be constructed. The units take 12 hours to construct if no other orders are placed.

 

However i want to give the user the option to create a 2nd order which can either be combined with the first order setting the build time for the new total back to 12. Or to start after the current build order has completed.

 

However to store all this infomation in a database its getting to over 50 different fields in the same table and im searching for a better method. The 5 main variables i want to use are as follows:

 

 

u1 : the amount of currently constructed units

u1_b1 : the amount of units in the first build order

u1_t1 : the time till the first build order completes

u1_b2 : the amount of units in the second build order

u1_t2 : the time till the second build order completes

 

This seems reasonable enough but if i have 10 or even more individual units it means the table is going to get rather large.

 

Is their any way someone can think of a more logical approach to this. I need all that infomation as each hour a script runs which calculates how many units to construct (effectivly minus from u1_b1/u1_b2 and adds to u1).

 

Thanks in Advance

Mike

Link to comment
https://forums.phpfreaks.com/topic/177440-big-database-table-better-way/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.