0

I have a table of 336 rows. Each row assembles 30 minutes during the day throughout the week. In other words: 24 x 2 x 7

Timestamp: UNIX format

timeslot: (dunno yet)

My aim is to find the best way to name timeslots inside the table so I can map any timestamp to its row (timeslot) inside table.

I came to the idea of naming it dhhmm for Example 10830 means Sunday 8:30 am

But now I have issues when fetching the data using mysql. Can anyone suggest any better name convention?

wallyk
  • 56,922
  • 16
  • 83
  • 148
TDSii
  • 1,675
  • 4
  • 20
  • 29

1 Answers1

0

Why not name the slots for human directness and simplicity? Sun 00:00:00-29, Sun 00:00:30-59, ..., Sat 23:59:30-59

But don't use the name for selecting a slot, use the slot identifier, perhaps a simple integer sequence 0 .. 24*2*7-1.

wallyk
  • 56,922
  • 16
  • 83
  • 148
  • perhaps u understood me correctly and used the right term i want slot identifier. this is something that i couldn't come up with and a mere sequence doesnt seem to be correct when I want to do selections. any other ideas? – TDSii Jul 31 '11 at 18:21