View Full Version : Sorting file numbers
wibumba
11-20-2008, 01:04 AM
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.
This should help:
$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!
wibumba
11-20-2008, 02:07 AM
Well, it's not sql. It's files in a directory...
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!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.