[Zope] case insensitive searches

Maggie Shapland Maggie.Shapland@bristol.ac.uk
Wed, 17 Jan 2001 13:47:13 +0000


How does one do a case-insensitive search using sql 
methods when the underlying database is case-sensitive? Although I can 
force the search on the database to look for a lower case string, I 
cant make the person giving the value give me the value in lower case, 
and I know I shouldnt use dtml-var due to security reasons.
I guess I really want the dtml-var attributes implemented 
in sql-var since 
lower(fieldname) like <sql-var "'%' + fieldname + '%'" 
  type=string lower> 
does a case sensitive search whereas:
lower(fieldname) like '%<dtml-var fieldname lower>%' 
works fine since it forces the user input to lower case 
----------------------
Maggie Shapland, Computing Service, University of Bristol, Tyndall Av, 
Bristol BS8 1UD
Tel: 0117-9289869 (Int 9869)
Email: Maggie.Shapland@bristol.ac.uk
Web page: http://www.cse.bris.ac.uk/~ccmjs/
1925 Lanchester 21, 1925 Talbot 10/23, 1929 Peugeot 190S, 1986 Moss 
Monaco