Hello

I Need To Know how to

Retrieve Random Data From A Table In Database

i have a table called actiongames

i need a code to retrieve random data from this table

Recommended Answers

Zero, for something like this, you'll start learning MySQL Operators.

SELECT * FROM actiongames ORDER BY RAND()

If you want to designate how many rows to gather

SELECT * FROM actiongames ORDER BY RAND() Limit 5

Hope this helps!

Jump to Post

All 4 Replies

Zero, for something like this, you'll start learning MySQL Operators.

SELECT * FROM actiongames ORDER BY RAND()

If you want to designate how many rows to gather

SELECT * FROM actiongames ORDER BY RAND() Limit 5

Hope this helps!

commented: Thanks Mate :) +2

Zero, for something like this, you'll start learning MySQL Operators.

SELECT * FROM actiongames ORDER BY RAND()

If you want to designate how many rows to gather

SELECT * FROM actiongames ORDER BY RAND() Limit 5

Hope this helps!

Ya It helps so much thanks so much

Please mark as "Solved" =)

Sure Solved Thanks So Much

Be a part of the DaniWeb community

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