No announcement yet.

DESC problem

  • Filter
  • Time
  • Show
Clear All
new posts

  • DESC problem

    There is a command in part of my script to collect data from the news table, but when it does, the data is not ordered desc

    $result = mysql_query("SELECT * FROM news ORDER BY newsid DESC");

    thats the command i use and there is nothing wrong to my knowledge. Any ideas why it is doing this?

  • #2
    $result = mysql_query("SELECT * FROM aguest ORDER BY gbid DESC LIMIT $st,$end");

    thats a statement from one of my scripts and works perfectly and is in the same format as yours so r u certain u're using the right field names and the right table name?


    • #3
      Looks fine to me...

      Do you have a TimeStamp or DateTime field that you can sort on?


      • #4
        wait a sec. does the query run or do you get an error?

        If you are not getting an error i would try ordering by another field if not for the script (b/c as max said it would be better ordering by dateline) then at least for debugging.

        Also does it order correctly when you order asc? This will also help you identify where the problem is...

        It has to be the field mate because i use a similar query in my news script at it works fine.
        Last edited by Conscience; Sun 6 Jan '02, 4:17pm.


        • #5
          got solved by the other scriptor, the <tr></tr> weren't inside the fetch, I don't see how that would affect it though


          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.