I'm trying to understand the SQLSet object and what options I have to
filter the set. Given the following query:
f1=db((db.Employee.id==db.EmployeeSection.employeeID) & \
(db.Section.id==db.EmployeeSection.sectionID) & \
(db.Employee.id==9000))
I'd like to filter the results as follows:
r2=f1(Section.schoolYear==2009).select()
or view the results as follows:
>>>for row in f1(Section.schoolYear==2009).select():\
... print row.name
result...
NameError: name 'Section' is not defined
Can I filter a SQLSet or do I need to refine the query to include all
my "where" clause statements such as:
f1=db((db.Employee.id==db.EmployeeSection.employeeID) & \
(db.Section.id==db.EmployeeSection.sectionID) & \
(db.Employee.id==9000) & \
(db.Section.schoolYear==2009) )
Thanks.
-Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---