Jump to content

[SOLVED] Order By??


muat

Recommended Posts

I want to order the results of an SQL query by date 1st then by time. this will then alow me to insert records out of syen and for the report to still be correct.

 

my code is currently:

 

$sql33 = "SELECT * FROM fgqcdetails WHERE JobName = '$_GET[job]' ORDER BY CheckDate AND timeTake LIMIT $limitvalue, $limit";

 

this doesn't seem to be working!

Link to comment
https://forums.phpfreaks.com/topic/118086-solved-order-by/
Share on other sites

thay has helped, however my data is sill not in order

 

page 1

Date  25/07  25/07  25/07  25/07  25/07  25/07  25/07 25/07

Time  10.10  10.30  10.50  11.10  11.30  11.50  9.30  9.50

 

page 2

Date 29/07  29/07  29/07  29/07  29/07 29/07  29/07 29/07

Time 10.00  10.20  10.40  11.00  11.20  11.40  12.00 12.20

 

page 3

Date 29/07  29/07  29/07  29/07  29/07  29/07  29/07  29/07

Time 7.20    7.40    8.00  8.20    8.40    9.00    9.20    9.40

 

 

 

 

$sql4 = "SELECT * FROM fgqcdetails WHERE JobName = '$_GET[job]' ORDER BY CheckDate ASC, timeTake ASC LIMIT $limitvalue, $limit";

 

any thoughts??

 

 

Link to comment
https://forums.phpfreaks.com/topic/118086-solved-order-by/#findComment-607529
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.