mardi 7 août 2018

SQL Select limit 5 records than choose random one line

Im making some generator and I need to make some diferences in every result. My question is....

I have one big mysqldb, in the program, I would like to select more than one row...

For example limit 5. Than I need to make random suffle of this five line select, and than pick only one line.

Its necesssary first pick 5 lines and than suffle, cause, the DB cannot be ordered by random. (I need order by one value before I pick 5 lines)

Can somebody advice? Thank you very much.

F.




Aucun commentaire:

Enregistrer un commentaire