Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    adding an ORDER BY in my SQL string doesn't work?!

    using this works
    Code:
    $query  = "SELECT * FROM Headertbl LIMIT $offset, $rowsPerPage";
    Changed to this, doesn't work?!
    Code:
    $query  = "SELECT * FROM Headertbl LIMIT $offset, $rowsPerPage ORDER BY HeaderDate ASC";

  2. #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    15,016
    Thanks
    164
    Thanked 2,246 Times in 2,233 Posts
    Limit should be at the end, look at the manual
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •