Jump to content
Sign in to follow this  
Mudsaf

Order by TimeStamp DESC PHP query

Recommended Posts

Hello, im not sure should i add this to "SQL" category since this is bit more sql-related but any fix to this. I have timestamp field in my database and it has worder ORDER BY Desc so far from oldest to newest and now at 2013 it doesn't work like that.

SELECT * FROM ms_news ORDER BY newsDate DESC LIMIT 0, 1

Last 2 values Code displays this

2013-01-03 01:48:05   

Should display this

2013-01-04 01:03:53 

At year 2012 it worked from oldest to newest so im not sure does the 2013 year mess the desc somehow. Blargh fixed, had taken the value from Date and not Datetime :P

Edited by Mudsaf

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...