Jump to content


Photo

random "quote" from SQL


  • This topic is locked This topic is locked
2 replies to this topic

#1 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 22 October 2006 - 06:54 PM

Hey guys,
This sounds quite stupid, but i'm wondering how to randomly
pick 2 results from a database, and show them on my home
page, basically for my clients I am allowing them to leave a
message and stating what they like etc. then I was going to
randomly pick 2 of the X amount and show them on my homepage.

Any ideas?

#2 extrovertive

extrovertive
  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 22 October 2006 - 06:55 PM

ORDER BY RAND()
LIMIT 2

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 22 October 2006 - 06:57 PM

thx.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users