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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.