Sorry, I misunderstood your configuration and what you were trying to do. The ignore_field_case setting does not affect searching for values within string fields -- rather, it ignores the case of the field name itself when creating new fields in the database (e.g., if you have Field('My_Field'), the database will get a field called "my_field" -- though in your Python code, you can refer to the field as My_Field).
You probably want: db.mytable.myfield.ilike(some_value) ilike is for case-*i*nsensitive like, and is a shortcut for: db.mytable.myfield.like(some_value, case_sensitive=False) Anthony On Monday, November 16, 2015 at 3:37:44 AM UTC-5, Annet wrote: > > Hi Anthony, > > Thanks for your reply. > > Note sure if the above is your actual code, but I think you wanted: >> >> db.ignore_field_case = myconf.take('ignore_field_case', cast=lambda value >> : bool(int(value))) >> > > > This is my actual code for the connection string: > > > db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', > cast=lambda value: int(value)), lazy_tables=myconf.take('db.lazy_tables', > cast=lambda value: bool(int(value))), > migrate_enabled=myconf.take('db.migrate_enabled', cast=lambda value: > bool(int(value))), ignore_field_case=myconf.take('db.ignore_field_case', > cast=lambda value: bool(int(value))), check_reserved=['all']) > > > and in appconfig.ini > > > ; db configuration > [db] > uri = postgres://********:********@localhost:5432/******** > migrate = 0 > migrate_enabled = 0 > pool_size = 1 > lazy_tables = 1 > ignore_field_case = 1 > > > The Web2py book gives the following syntax for ignore_field_case: > > db = DAL(.postgres://...',...,ignore_field_case=False) > > > I hope I provided you with sufficient information to help me solve the > issue. > > Kind regards, > > Annet > -- 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. For more options, visit https://groups.google.com/d/optout.