dimanche 28 décembre 2014

Query random item per day in android sql

I am developing a mobile application that has thousands of records in a table and has a word of the day feature. The problem is that sqlite does not support seeding random function like mysql does in this sample query



SELECT *
FROM word_table
ORDER BY RAND('. date("mdY") .') LIMIT 1


Is there any other way that I can just query 1 item per day without inserting date to each item as it is time consuming?


Thanks Guys





Aucun commentaire:

Enregistrer un commentaire