Ltj_bukem Posted November 28, 2007 Share Posted November 28, 2007 Hi, I have a table that counts how many times a document has been downloaded, this is works fine but I'd like to do a query that would display the top ten downloaded documents. I imagine it would be something like query = "SELECT FROM docs........ Cheers Link to comment https://forums.phpfreaks.com/topic/79271-querying-highest-value/ Share on other sites More sharing options...
trq Posted November 28, 2007 Share Posted November 28, 2007 SELECT fld FROM doc ORDER BY fld DESC LIMIT 10; Where fld is the name of the field containing your counts. Link to comment https://forums.phpfreaks.com/topic/79271-querying-highest-value/#findComment-401271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.