Re: [web2py] Re: OperationalError when using datetime

2018-07-19 Thread Anthony
> > row = db(db.post.author== auth.user.id).select(db.post.ALL, > orderby=~db.post.created_on, limitby=(0,1)).first() > reports = row.message if row else None > If you are only returning the "message" field, just select the db.post.message field, no need to use db.post.ALL. > def sea

Re: [web2py] Re: OperationalError when using datetime

2018-07-19 Thread Dave S
On Thursday, July 19, 2018 at 12:56:37 AM UTC-7, Maurice Waka wrote: > > Team, Anthony, thanks so much for the help. > Anthony, I believe, I've mentioned this before, in previous questions > about the other apps. You've helped me a lot and I appreciate very much. > The current issue is that, I

Re: [web2py] Re: OperationalError when using datetime

2018-07-19 Thread Maurice Waka
Some more info, this is the module code: Post = db.define_table('post', Field('author', 'reference auth_user', default=auth.user_id, writable=False, readable=False), Field('message', 'text', requires=IS_NOT_EMPTY(), notnull=

Re: [web2py] Re: OperationalError when using datetime

2018-07-19 Thread Maurice Waka
Team, Anthony, thanks so much for the help. Anthony, I believe, I've mentioned this before, in previous questions about the other apps. You've helped me a lot and I appreciate very much. The current issue is that, I am developing a system of q&a with the aim of storing the questions for future mach

[web2py] Re: OperationalError when using datetime

2018-07-18 Thread Anthony
On Wednesday, July 18, 2018 at 1:08:24 AM UTC-4, Maurice Waka wrote: > > I have two problems; > >1. When I successfully submit a form and try to retrieve the text for >processing in the controller, I tend to get the previously submitted text >and not the latest. > > What do you mean b

[web2py] Re: OperationalError when using datetime

2018-07-17 Thread 黄祥
orderby should be table's field not a conditional comparison ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#orderby--groupby--limitby--distinct--having-orderby_on_limitby-left-cache for 2nd question: web2py auth.signature will cover to update value of field modi