>
> Solved it by using 2 seperate queries:
>
rij = db().select(
db.track_trace.id_reparaties, db.track_trace.id_status,
db.track_trace.created_by, max,
groupby=~db.track_trace.id_reparaties,
having=(db.track_trace.id_status == 4))
ids = []
for item in rij:
Thanks you almost had it,
max = db.track_trace.created_on.max()
having = (db.track_trace.id_status == 11)
rij = db().select(db.track_trace.id_reparaties, db.track_trace.id_status, max,
groupby=~db.track_trace.id_reparaties,having=(db.track_trace.id_status == 11))
The above code is working and
+1 schreef Bastiaan:
>
>
>
--
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 Goog
>
> I tried some variations but no correct output so far
>
max = db.track_trace.created_on.max()
recs = db().select(max,db.track_trace.id_status, groupby=db.track_trace.
id_reparaties)
With this I get the max date, but not the id_status that belongs to that
date
--
Resources:
- http://web2py
hmm another reply just gets deleted, immediately after posting(something
wrong with my other account I think)
I tried somethings now and I am a step closer:
max = db.track_trace.created_on.max()
recs = db().select(db.track_trace.id_status, max, groupby=db.track_trace.
id_reparaties)
Now I get th
>
> And again everything gets deleted.. I don't understand
>
--
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 s
>
> hmm somehow my reply got deleted.. I want to count the groups that have a
> certain id_status as their newest item. The group will indeed give 1 item,
> but I want to know how many groups.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2
I'll try to make it better ;).
For example I have the following list:
id | id_reparaties | id_status | created_on
1 | 1 | 1 | 01-01-14
2 | 1 | 3 | 15-01-14
3 | 2 | 1 | 02-01-14
4 | 3 | 1 | 16-01-14
5 | 1
Somehow my replies all got deleted.
I want one item per group(the newest) and then filter by id_status and count
how many groups have that certain id_status. This should be possible i think. I
had a nice example in one of those deleted post, but i don't know how i can get
that back.
--
Resou
Op donderdag 23 januari 2014 22:29:04 UTC+1 schreef pa...@cancamusa.net:
>
> If there's no error message it may be something different. Please copy the
> error trace, and tell us your web2py version number.
>
> El jueves, 23 de enero de 2014 16:09:44 UTC+1, Bastiaan van
to get the password reset working
>> again from localhost. I thought it was just a fluke but now that someone
>> else is mentioning it too, maybe it isn't? Bastiaan, what version are you
>> using?
>>
>> On Monday, December 23, 2013 9:27:22 PM UTC-6, Massimo
I have a auth table with usernames ( auth.define_tables(signature=True,
username=True)) and my forgot password is not working anymore.
It's the standard function:
def user():
"""
exposes:
http:///[app]/default/user/login
http:///[app]/default/user/logout
http:///[ap
I use usernames with my auth table, but the forgot password function
stopped working. When I enter a username that does not exist, I get a
validation error(the red bar under the field saying 'Invalid Username').
But when I enter a username that does exist, I get no validation error, but
the fla
I have auth table with username and when I try forgot password the function
fails. When I enter a non existing username, the validator says Invalid
username. But when I enter a existing username the flash is shown with
"Invalid username" but the field validates fine and the email is not being
s
I have a problem with forgot password. When I enter a username that does
not exist, I get the red bar validator under the field saying "Invalid
username", so that functions correct.
But when I enter a username that does exist, I get no validation error and
the flash message says "Invalid usernam
15 matches
Mail list logo