Jump to content

selecting latest group of records


adambedford

Recommended Posts

hi,

 

i have a database that looks something like this:

 

+--------------+-------------------+-------------------+

| ce_id          | ce_start_time  | ce_cal              |

+--------------+-------------------+-------------------+

| 9                | 09:00              | 1105                |

| 10              | 09:00              | 1105                |

| 11              | 10:00              | 1105                |

| 12              | 13:00              | 1201                |

| 13              | 14:00              | 1201                |

+--------------+-------------------+-------------------+

 

the ce_cal field refers to the year and period (11 = 2011 and 05 = period 5).

 

i need to fetch the latest batch of records out of the table, ie those with the highest 'ce_cal' values.

 

unfortunately, i don't know how to do this!

 

any help would be appreciated, thanks!

Link to comment
https://forums.phpfreaks.com/topic/239253-selecting-latest-group-of-records/
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.