Correct the code
    categorys=db(db.dl_category.id==db.dl_category.parent_id).select()
to
    categorys=db(db.category.id==db.category.parent_id).select()

On 12月20日, 下午2时53分, sharekey <share...@gmail.com> wrote:
> Hi all,
>
>     I defined a table as below:
>
>     db.define_table('category',
>                 SQLField('parent_id', 'integer'),
>                 SQLField('child_id', 'integer'),
>                 SQLField('sort_id', 'integer'),
>                 SQLField('name'),
>                 SQLField('description'))
>
>     I want to select the records which parent_id=id as:
>     categorys=db(db.dl_category.id==db.dl_category.parent_id).select()
>
>     It don't work on GAE, dev_appserver console output:
>     SyntaxError:SQLQuery:right site of filter must be a value or
> entity
>
>     It work on build-in server, how can I do it on GAE?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to