Spike121 Posted April 11, 2009 Share Posted April 11, 2009 Hey, I'll jump right into it. I need a MySQL code that selects a random result from a table. select link from table1 Would that select a random one, or the latest entry? If it wouldn't select a random result, what would? Also, what would select the latest one too? I need both if possible. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/153605-random-mysql-result/ Share on other sites More sharing options...
hastishah Posted April 11, 2009 Share Posted April 11, 2009 hi use this query SELECT * FROM tablename ORDER BY Rand( ) LIMIT 2 ; Link to comment https://forums.phpfreaks.com/topic/153605-random-mysql-result/#findComment-807136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.