Subject Re: php case insensitive field access
Author jackdmason
--- In firebird-php@yahoogroups.com, Lester Caine wrote:
>
> jackdmason wrote:
> > Who maintains the Firebird PHP interface? That is where this problem needs to be resolved with either better documentation or implementation of a missing Firebird capability.
> The original author is no longer around, but did a great job with building the
> version of php_interbase shipped since PHP5.0. Marius has added a few small
> fixes to it in recent times, but apart from breaks introduced by API changes in
> earlier versions of PHP5 there has been little need to change anything.
> pdo_firebird is something we tend to avoid although it is functional.
>
> > MySQL performs a case-insensitive search when you use LIKE. Even if the PHP interface allowed that, it would solve the problem.
> The Firebird version of LIKE is case sensitive. It's not the interface that
> affects that fact. You need to use the 'COLLATE' trick to make it work, however
> the one we forgot to mention is 'CONTAINING' which will find the string anywhere
> in the field, but is case insensitive.
>
> I'd still like to know what PHP code you are using to access Firebird. It does
> have a bearing on what works. I've used ADOdb since the start of switching to
> PHP and this handles everything I need.
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
>
We are using PHP 5.2 with InterBase 6 at present but want to switch to Firebird. We have been told the interface from PHP is the same as that for InterBase. Our web hosting companies have reluctantly enabled the InterBase/Firebird interface in php.ini and used whatever Interbase.dll accompanied the PHP version.

You mention ADOdb as an interface to Firebird. I have not looked at that. If that improves the interface, we can switch...

I haven't seen CONTAINING in InterBase but assume it must do a case insensitive search such as WHERE NAME CONTAINING 'Ralph' as opposed to WHERE NAME LIKE 'Ralph%'? If so, that would not only provide us with what we need, but improve our search capability for other fields.

I will look up ADOdb. Thanks.