At 6:16 AM -0500 7/29/99, Martin Ramsch wrote:
>On Do, 1999-07-29 02:18:28 +0200, Tommaso Melodia wrote:
>> Could anybody explain me quickly how do I perform a random research on a
>> series of records using mysql?
>The maybe most simple way is to first look up how many records are
> SELECT COUNT(*) AS n FROM ... WHERE ...;
>Retrieve this n, compute a random number between 1 and n, say x,
>and then do:
> SELECT ... FROM ... WHERE .... LIMIT x,1;
Just a small correction: x would be between 0 and n-1.
The record numbering for the two-argument form of LIMIT
begins at 0, not 1.
Paul DuBois, paul@stripped