[imp] sql.php patches for Oracle.

Andrew Morgan morgan@orst.edu
Tue, 15 Jan 2002 15:39:00 -0800 (PST)



On Tue, 15 Jan 2002, Jon Parise wrote:

> On Tue, Jan 15, 2002 at 05:48:15PM -0500, Mike Coughlan wrote:
>
> > For those relying on Oracle, here is the necessary patch:
> >
> > /horde/lib/Prefs/sql.php
> > line 184
> > --               $name = trim($row['pref_name']);
> > ++               $name = trim($row['PREF_NAME']);
> >
> > line 186
> > --                    $this->prefs[$name]['val'] = $row['pref_value'];
> > ++                    $this->prefs[$name]['val'] = $row['PREF_VALUE'];
> >
> > If some clever PHP person can find an appropriate placement for a
> > Lowercase() function, I would appreciate it.  As you might guess, my PHP
> > skills are nonexistent.
> >
> > Would the Horde dev team consider this to be a bug in the OCI8 driver?
>
> What piece of software imposes the case limitation?  Does Oracle
> require that field names be in uppercase?

There is a similar bug/feature in the oracle driver for perl.  If you do a
$sth->fetchrow_hashref and try to access the individual columns in the
hash, it must be done as all uppercase.  For example:

$$href{'MY_COLUMN_NAME'}

I assume php is doing a similar operation here.

Actually, I don't know if this is only true for Oracle, since I don't
think I've use this kind of hashref fetch with MySQL.

	Andy