Results 1 to 4 of 4

Thread: Sorting file numbers

  1. #1
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sorting file numbers

    The files in my database are numbered. What I'm trying to do is get the file name that has the highest number, then second highest, third, etc

    Any help would be awesome.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    This should help:
    Code:
    $query = "SELECT * FROM `foo` ORDER BY `column_count` DESC";
    The column_count should be replaced with your field that is numbered, and the foo should be replaced with your table name. I hope that this helps!
    Jeremy | jfein.net

  3. #3
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, it's not sql. It's files in a directory...

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Oh, sorry I thought you meant SQL because you said database, you should be more clear on what kind of database. Sorry! I don't have anything for you, I'm not good with the dir() functions!
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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