0

i have this query:

$item_query = mysql_query("SELECT * FROM item");

this will always get the data from 1st row to bottom row.

how can i get random data?

SELECT * FROM item  ORDER BY RAND()
or
SELECT * FROM item ORDER BY NEWID()

i want the best way to get random data.

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.