Hi,

Please find the solution of the issue as follows:

In Oracle the indices of the record set are returned in Uppercase. To take
care of this i.e. to return the indices in lowercase we can make a small
change in Zend_Db. We need to change the
\library\Zend\Db\Adapter\Abstract.php. Change the code

    public function fetchRow($sql, $bind = null)
    {
        $result = $this->query($sql, $bind);
                return $result->fetch($this->_fetchMode);
    }


With 

    public function fetchRow($sql, $bind = null)
    {
        $result = $this->query($sql, $bind);
                return
array_change_key_case($result->fetch($this->_fetchMode));
    }

i.e. use the function array_change_key_case on the array which is going to
be returned by the function.

Please find the attached Abstract.php file.

Regards,
Sanjay Aggarwal
 

-----Original Message-----
From: Gavin Vess [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 9:34 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: [fw-general] Problem With Oracle

See the notes about case sensitivity here:
   
http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.htm
l

Also, see the user comments here:
   http://php.net/oci8

When fetching associative arrays, use uppercase string indices. It appears
the PHP OCI Library is less lenient with the field names returned by Oracle.
e.g.
echo $row['field1']; // This won't return anything.
as opposed to:
echo $row['FIELD1'];

Cheers,
Gavin

[EMAIL PROTECTED] wrote:
> Hi,
> we are using zend frame work for development. Our application support 
> three databases MYSQL,MSSQL and ORACLE. With Oracle we are facing one 
> problem it is returning selected column names of the table in 
> uppercase while we have declared column names in lowercase during 
> creation of table and because of that we are not able to get the 
> values from the recordset. here i am giving you some code to clear the
problem.
> $rightrow = $db->fetchRow("select rep_right from e11contact_rep where 
> user_name='$user_id' "); $repright = $rightrow["rep_right"]; but its 
> returning "REP_RIGHT" as key value
>
> Regards,
> Dharmendra
> Value one
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at http://mail2web.com/ .
>
>
>
>   

-- 
Cheers,
Gavin

Which ZF List?
=================
Everything, except the topics below: [email protected]

Authorization, Authentication, ACL, Access Control, Session Management
[EMAIL PROTECTED]

Tests, Caching, Configuration, Environment, Logging
[EMAIL PROTECTED]

All things related to databases
[EMAIL PROTECTED]

Documentation, Translations, Wiki Manual / Tutorials
[EMAIL PROTECTED]

Internationalization & Localization, Dates, Calendar, Currency, Measure
[EMAIL PROTECTED]

Mail, MIME, PDF, Search, data formats (JSON, ...)
[EMAIL PROTECTED]

MVC, Controller, Router, Views, Zend_Request*
[EMAIL PROTECTED]

Community Servers/Services (shell account, PEAR channel, Jabber)
[EMAIL PROTECTED] 

Web Services & Servers (HTTP, SOAP, Feeds, XMLRPC, REST)
[EMAIL PROTECTED]


How to subscribe:  http://framework.zend.com/wiki/x/GgE


Attachment: Abstract.php
Description: Binary data

Reply via email to