I want to write select statement with random and limited number
It looks like that.

db(db.a.status==False).select(db.a.md5,orderby='<random>',limitby=(0, 149))

what it dose is it dose random on result and take 150 rows


if you write it in python

* for row in db(db.s.status==False).select(db.s.md5):
        md5_list.append(row['md5'])
        random.shuffle(md5_list)
        md5_list=md5_list[:150]
*

*
*

*What is the shortest process time to deal with this problem.*

*Thank you in advance.*

*
*

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to