vendredi 18 septembre 2015

How do you create a random selection logic in SQLite with certain conditions?

The selection logic runs like this :

  • Select an item from table 1 in the database and assign it to the item at hand in table 2

  • For the next two items in table 2, the item from table 1 to be assigned to them should be different. There should be no same assignments within 3 consecutive items in table 2.

I hope I explained it properly

Aucun commentaire:

Enregistrer un commentaire