1. userId need references do auth_user if you want relationship both.
1.1 Then the second condicion will be satisfied.
2. You said that request.args[0] is day value ; but you are comparing with
month of date. Try chance or db.emeter.instant.month() by
db.emeter.instant.day() or chance the position of request arguments.
Em quinta-feira, 24 de novembro de 2016 08:38:29 UTC-3, Mike Stephenson
escreveu:
>
> rows=db((str(db.emeter.instant.month) == str(request.args[0])) &
> (db.emeter.userid==auth.user_id) ).select()
>
>
> emeter:
>
> db.define_table('emeter',
> Field('userid'),
> Field('instant', 'datetime',
> default=request.utcnow+datetime.timedelta(0,19800), writable=False,
> readable=False),
> Field('reading')
> )
>
>
> it gives me no value instead of the correct set. What's wrong here.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.