Hi! How use executesql for rows?
controller
def statistic():
results = dbstat.executesql("""select
ip_user,strafb1,strafb3,sostname,site from ip_adm_hist('01.09.09',
'30.09.09',0)""")
return dict(results=results)
view
{{extend 'layout.html'}}
{{for person in results:}}
{{=person.ip_user}},
{{=person.strafb1}},
{{=person.strafb3}},
{{=person.sostname}},
{{=person.site}}<br/>
{{pass}}
not work
error AttributeError: 'tuple' object has no attribute 'ip_user'
Thank's help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---