Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MySQL

Name: Digger Nick 2013-07-04 16:26

Got a mySQL question,

  I'm trying to figure out the best way of doing this I have a table for time slots, and what I want is to have a groups of these slots with ids unique to the group.

Would it be better to use a junction table or would the way it is work just fine?

+------------+------------+---------+------------+
|  Group Id  |   Slot id  |   Time  |    Date    |
+------------+------------+---------+------------+
|     1      |      1     | 2 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
|     1      |      2     | 3 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
|     2      |      1     | 1 bongs | Nov 12 1605|
+------------+------------+---------+------------+
|     2      |      2     | 7 bongs | Nov 12 1605|
+------------+------------+---------+------------+

Name: Anonymous 2013-07-04 16:31

nevermind I guess it doesn't hurt to have slot id be unique and just increment through the groups and aggregate the slot id's by the group id.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List