François-xavier Jacobs wrote:
> when a tried to use "order by 1234567892" it always return the same order

Because this is the *same* value for all records.

> i would like to "seed random" a request, so i could do use some pagination
> system with a order by random(), is this possible sqlite ?

Calls to random() are never repeatable.

I'd suggest to
1) read all IDs of the table into memory;
2) shuffle these IDs randomly; and
3) explicitly load the records for one 'page' of ID values.

Alterntively to step 3, you could save the indexes of the shuffled
array entries back into a new field in the table so that you have
a column that you can do an ORDER BY on.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to