Case-sensitive searches in php/postgresql

From: Date: Tue, 29 Apr 2003 12:32:47 +0000
Subject: Case-sensitive searches in php/postgresql
Groups: php.general 
Request: Send a blank email to php-general+get-145631@lists.php.net to get a copy of this message
Hi All, I have built a database of recipes and a fairly simple search facility. The user can search either by ingredient or by recipe name. Ingredients are stored in a 'text' field in postgres and the recipe names are stored in a varchar(100) field. The problem is that I want to be able to perform 'case-less' searches. For example, the first record in the db is 'Pheasants with Bacon' (capital P on Pheasants). However if the user searches for 'pheasants', they are returned 0 results. Is there any way to make postgresql disregard the case of the text in the field so that a user can search for Pheasant or pheasant, (or PhEaSaNT for that matter) and still get the results? Thanks, Matt

« previous php.general (#145631) next »