Anyone want to help me with this? And by help, i mean tell me exactly what to type :$
I have a table with around 100 entries, each one is a vetted customer testimonial type thing and the data isn't likely to change/grow much.
What I need is:
Select 6 of them at random, then they'll be displayed at various points on a page.
I've got an SQL query working for it (I know it's not the most efficient/fastest way of doing it, but it seemed the most straightforward way to get 6 unique random rows):
SELECT text FROM `content` ORDER BY RAND() LIMIT 0,6
Now how do i get that into an array so I can print each row result individually? All the stuff online seems to be about finding individual rows and adding them to an array, not finding 6 rows and adding each row to an array.
Or should I bite the bullet and learn some PHP so I can do it myself? Just sees like a waste as I'm unlikely to ever need it again after this :$
▪
┌────┐ ┌────┐
│ │ │ │ ▪
│ └────┘ │
│ ──┐ ┌── │ ▪
┌──────┤ ▪ ▪ │
┌┘ │ │ ▪
┌─┤ └──┐ │ │ ┌──┘
│ │ │ ││ ││ │ ┌─┐
│ │ └─┼┤ └┴─┴───┘ │
│ │ ─┘│ │
│ │ ┌──────┐ └┬──────────┘
│ │ │ │
│ │ │ │
└───┘ └───┘ |