For a start i tried something like: words = db(db.words.key in ['news', 'sports', 'arts']).select(db.words.id, db.words.key, db.words.parent) but i think i halted my server wih that..
On 19 joulu, 10:19, mmstud <mms...@gmail.com> wrote: > Im using mysql backend and like to do this sort of query, is it > possible with DAL? > > SELECT w1.key, (SELECT COUNT(*) FROM words w2 WHERE w2.parent = w1.id) > AS childs > FROM words w1 > WHERE w1.key IN ('key1', 'key2', 'key3') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---