Jump to content

Sorting Results so the Latest comes on Top


npsari

Recommended Posts

I store date in my database using:

$Date = date("Y/m/d");

 

And I store Time using:

$tim = localtime(time(),true);
$Time=($tim['tm_hour'].":".$tim['tm_min'].":".$tim['tm_sec']);

 

Now, I want to sort Posts... the Latest posted at the Top...

 

 

SORT BY Date DESC

When I do that, the Time damages the sequence

 

SORT BY Time DESC

When I do that, the Date damages the sequence

 

How can I sort results by Date and Time

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.