I think you want r = (db.badlist.PostDate != None) without the db in front of it.
-Jim On Saturday, May 6, 2023 at 6:04:39 PM UTC-5 snide...@gmail.com wrote: > Added missing frame info > > On Saturday, May 6, 2023 at 3:51:43 PM UTC-7 Dave S wrote: > > Why does this > > > - > > *File > > C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py > > in _select_aux at line 865* code arguments variables > Function argument list > > (self=<pydal.adapters.sqlite.SQLite object>, sql='SELECT > "badlist"."id", "badlist"."burl", "badlis...LL)> ORDER BY > "badlist"."tags", > "badlist"."burl";', fields=[<pydal.objects.Field object>, > <pydal.objects.Field object>, <pydal.objects.Field object>, > <pydal.objects.Field object>], attributes={'orderby': > <pydal.objects.Expression object>}, colnames=['badlist.id', > 'badlist.burl', 'badlist.tags', 'badlist.PostDate']) > - > > turn into this? > > > - > > *File > > C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py > > in _select_aux_execute at line 859* code arguments variables > Function argument list > > (self=<pydal.adapters.sqlite.SQLite object>, sql='SELECT > "badlist"."id", "badlist"."burl", "badlis...LL)> ORDER BY > "badlist"."tags", > "badlist"."burl";') > > > > The relevant controller code is > > r = db(db.badlist.PostDate != None) > rows=db(r).select(orderby=db.badlist.tags|db.badlist.burl) > > The exception is > > > File > "C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py", > > line 468, in execute > rv = self.cursor.execute(command, *args[1:], **kwargs) > sqlite3.OperationalError: near "<": syntax error > > -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/32ceb75e-6e01-4d45-b4c3-ee853733528an%40googlegroups.com.