Jump to content

Recommended Posts

Lets see if I can explain this right....

 

I have a table with each row containing times.. so colA = 12:00 PM, colE = 2:00 PM, colM = 12:30 PM

 

and I have these displayed in a printable php page:

 

12:00 PM - start this
2:00 PM - do this thing
   sub do this thing: yes
12:30 PM - later thing

 

what I'd like to do, is figure out a way to SORT them so that it looks like this:

 

12:00 PM - start this
12:30 PM - later thing
2:00 PM - do this thing
   sub do this thing: yes

 

 

I thought about putting each timed thing into a different record, but that would be way to confusing since each timed event has sub events... and the table is already created :)

 

so is there a way I could gather all the information, then sort it by the time

Link to comment
https://forums.phpfreaks.com/topic/63561-heres-a-good-one-on-sorting-by-time/
Share on other sites

Effigy: isn't the point that it is the fields that contain all the differant times in one record, rather than there being lots of records containing each differant time? Of course, its not the best way to store data...but thats how i've understood the question.

 

djanim8: Yeah, i would go with a multidimensional array. I dont suppose anyone can give you any sample code without more information. Where does the "start this" and "later thing" come from? Perhaps you could post you existing code?

Effigy: isn't the point that it is the fields that contain all the differant times in one record, rather than there being lots of records containing each differant time? Of course, its not the best way to store data...but thats how i've understood the question.

 

I see. What I'm getting at is, why is the database set up this way, rather than do such and such.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.