I want to assign an integer to a set of rows in a MySQL Database table. I want the integer to be unique for each row from 1 to the number of rows in the table. So if there are twenty rows matching specific criteria in the table I want to assign them each a number between 1 and 20 so that if selected by this number they will be returned randomly and not in the order they were entered.
Can anybody recommend a solution for this?
Thanks, Mick
Aucun commentaire:
Enregistrer un commentaire