Subject Re: [firebird-php] Re: php case insensitive field access
Author Lester Caine
jackdmason wrote:
> This solution will not work. Both InterBase and Firebird allow case insensitive searches, as does MySQL. The php interface should allow that option to be used as part of a query.
> You cannot just capitalize the first and last name and accomplish anything. "McGrath" would not be found, nor would "van Duran", "MacDougal", etc., nor can you catch instances where a name has been entered incorrectly, such as Mcgee, variant spellings, etc.
> At present we have to have our web server call a store server to process InterBase accesses because of this very reason; not only with names, but with book titles, authors (may or may not a name or company), etc.
> We just need the php interface, at least for Firebird, to be fixed so we can do case insensitive searches. Delphi can do it, C++ can do it. Why cannot php do it?

Please don't top post ...

I do not understand your problem?

I made no mention of just capitalizing some letters. Shadow columns which are
all upper case or some other filtered version of the data work well cross
database and can be tailored to make indexing of that data work to our
advantage. This has nothing to do with the language we are using to access the

The next question has to be "Which abstraction layer are you using in PHP to
access the data?" There is nothing that I know of in PHP that prevents the same
queries used in other languages from working in PHP. However some PHP
applications will get in the way of that.

One thing that should perhaps have been listed is the COLLATE filters which will
provide case insensitive searches directly in the database. provides a very nice
historic view of the development of this. Personally I'm still using the older
style of working since my PHP applications can be used against a number of
database engines. If I was to drop all cross database capability then it would
be worth switching to the other methods, but it is also worth pointing out that
the UNICODE_CI method does not provide an easy way of testing the 'style' of the
inputs. When data has not been correctly entered with the preferred style of
upper and lower case, the incorrect entries will be displayed as if they were
correct, while the 'older fashioned' way of working at least allows some level
of checking. THAT is where upper casing the correct letters can be important?
You just have to look at paypal traffic to see the results of not bothering at all.

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Rainbow Digital Media -