This question has already been answered:

There is an ad table and you need to get the records in random order.

Reported as a duplicate by Mike members, Vladimir Martyanov , zRrr , Nofate 4 Apr '16 at 21:11 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Yes, and on the stackerflow with a dozen of similar questions, simply by the word "random" in the [mysql] category ... - Mike

2 answers 2

The simplest type of request:

SELECT * FROM table_name ORDER BY rand(); 
     SELECT* FROM объявлении ORDER BY RAND()