Querys

1 view
Skip to first unread message

david

unread,
Nov 7, 2009, 12:00:12 PM11/7/09
to Google App Engine
Hello,

How can I know how many items it returns a query?
Example:
eventos = db.GqlQuery ("SELECT * FROM Evento")
How many items?

Other question.
How can I do random of numers in python?

See you. Thanks.

N. Rosencrantz

unread,
Nov 7, 2009, 6:11:58 PM11/7/09
to Google App Engine
python list size or eventos.count() work or already answered question
best way with more info following link,
http://stackoverflow.com/questions/421751/whats-the-best-way-to-count-results-in-gql
and merging pure python lists using multiple queries is also doable
breaking 1000 limit. where earlier random numbers was discussed:
http://groups.google.com/group/google-appengine/browse_thread/thread/b3b41fb86f62b229/bea0d6a880cf01fa?lnk=gst&q=weibull#bea0d6a880cf01fa

Nick Rosencrantz
Reply all
Reply to author
Forward
0 new messages