Return Random Records in MySQL
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
- 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.
SELECT product_id, title, description
WHERE active = 1
AND stock > 0
ORDER BY RAND()
ORDER BY RAND() clause returns random records!
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
I've always been intrigued by recognition software because I cannot imagine the logic that goes into all of the algorithms. Whether it's voice, face, or other types of detection, people look and sound so different, pictures are shot differently, and from different angles, I...
I'm going to share something with you that will blow your mind: I don't have the MooTools documentation memorized. I just don't. I visit the MooTools docs frequently to figure out the order of parameters of More classes and how best to use...