Hello, I have a table with about 172 rows in it, and I need to get one random row from it. How could I do this? Thanx!
Do a search before posting. This has been answered:
http://www.phpbuilder.com/forum/archives/2/2000/7/4/103330
--ph
or if you're lazy like me, use the mysql "order by rand()" solution.
example:
select * from table order by rand() limit 1;
http://www.mysql.com/doc/M/a/Mathematical_functions.html
Brandon is right - it's faster and simpler to get everything in your SQL statement if you can!