Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.4

Bug #8915 Fetching vom Database does not work with Oracle
Submitted: 2006-10-09 09:09 UTC
From: d dot schwarz at lise dot de Assigned: quipo
Status: Closed Package: Translation2
PHP Version: 5.0.4 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2006-10-09 09:09 UTC] d dot schwarz at lise dot de (Daniel Schwarz)
Description: ------------ Since Oracle uses uppercase column-namens i had to change some Indeses from ['id'] to ['ID'] in the container classes to work. Strange, but this little change helped in my situation Test script: --------------- // example for changed fetchLangs function in db.php-Container // }}} // {{{ fetchLangs() /** * Fetch the available langs if they're not cached yet. */ function fetchLangs() { $query = sprintf('SELECT %s AS id, %s AS name, %s AS meta, %s AS error_text, %s AS encoding FROM %s', $this->db->quoteIdentifier($this->options['lang_id_col']), $this->db->quoteIdentifier($this->options['lang_name_col']), $this->db->quoteIdentifier($this->options['lang_meta_col']), $this->db->quoteIdentifier($this->options['lang_errmsg_col']), $this->db->quoteIdentifier($this->options['lang_encoding_col']), $this->db->quoteIdentifier($this->options['langs_avail_table']) ); ++$this->_queries; $res = $this->db->getAll($query, DB_FETCHMODE_ASSOC); if (PEAR::isError($res)) { return $res; } foreach ($res as $row) { $this->langs[$row['ID']] = $row; } } Expected result: ---------------- it works :-) otherwise i allways get "object #resourceId"

Comments

 [2006-10-09 10:42 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-10-09 10:58 UTC] d dot schwarz at lise dot de
... $db = DB::connect("oci8://lise:PASSWORD@MYDB"); $query = 'SELECT id AS aliasname FROM langs_avail'; $row = $db->getRow($query, DB_FETCHMODE_ASSOC); print_r(array_keys($row)); ?> results in Array ( [0] => ALIASNAME ) really! :-) if you use another application to confirm this (e. g. toad), you get the same result: uppercased aliasnames.
 [2006-10-09 15:16 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!