mysterbx Posted March 26, 2008 Share Posted March 26, 2008 Hey, Is it possible to set a limit for the mysql_query, to show latest 70 downloads (limit 0,70) and order them by rand (order them randomly)? Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/ Share on other sites More sharing options...
BlueSkyIS Posted March 26, 2008 Share Posted March 26, 2008 yes. your question was almost the query. Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/#findComment-501473 Share on other sites More sharing options...
mysterbx Posted March 26, 2008 Author Share Posted March 26, 2008 $result = mysql_query("select * from downloadz order by id DESC AND RAND() limit 0,20"); doesnt work... Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/#findComment-501477 Share on other sites More sharing options...
mysterbx Posted March 27, 2008 Author Share Posted March 27, 2008 someone! Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/#findComment-502052 Share on other sites More sharing options...
sasa Posted March 27, 2008 Share Posted March 27, 2008 SELECT * FROM (select * from downloadz order by id DESC limit 70) AS xxx ORDER BY RAND() Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/#findComment-502118 Share on other sites More sharing options...
mysterbx Posted March 29, 2008 Author Share Posted March 29, 2008 yeap, that works great, thanks... Link to comment https://forums.phpfreaks.com/topic/98009-latest-70-downloads-order-by-rand/#findComment-503863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.