«« Next » « Previous
«« Next » « Previous

Link Details

You don't have to pay, but you do have to vote! Login and vote now.
Link 57976 thumbnail

By davidwalsh
via davidwalsh.name
Published: Dec 20 2007 / 16:10

The ability to return random records from a MySQL table is invaluable.Returning random records is helpful when: featuring items without showing favoritism to one, testing different result sets in your PHP, and looking to display specific items in a non-specific order. The great part about selecting random records from your MySQL tables is that it's really easy.
  • 8
  • 3
  • 1051
  • 272

Comments

Add your comment
User 261350 avatar

harlan replied ago:

0 votes Vote down Vote up Reply

Right on home boy - good post!

User 107114 avatar

daniel replied ago:

0 votes Vote down Vote up Reply

I'm not sure I would go so far as to say it's *invaluable*. :-) It's an interesting, if esoteric application of RAND().

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (3)