Seems to me he's writing a 'test' type app - you are presented the 
questions in the random order, and you don't want to be presented the same 
question again.
I think you'd want to store in the session object a list of questions 
already taken, and make sure your random select excludes that list.

On Wednesday, April 4, 2012 11:48:46 AM UTC-7, Anthony wrote:
>
> Not quite sure I understand, but to select a single record at random:
>
> record = db(db.mytable).select(limitby=(0, 1), orderby='<random>').first()
>
> To create an update form for a record, you can then do:
>
> form = SQLFORM(db.mytable, record)
>
> Anthony
>
> On Wednesday, April 4, 2012 2:10:52 PM UTC-4, Sonu Srivastava wrote:
>>
>> i have a table in database and i want to fetch record one by one randomly 
>> from database on form...every record is shown on form with radio button and 
>> when user select one of them and click on submit button then next record 
>> will be shown on the form...
>> so..please help me for this code...
>>
>

Reply via email to