Re: cvs: pear /MDB2/MDB2/Driver/Manager ibase.php
| From: | Lukas Kahwe Smith | Date: | Wed, 12 Oct 2005 17:11:36 +0000 |
| Subject: | Re: cvs: pear /MDB2/MDB2/Driver/Manager ibase.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-35461@lists.php.net to get a copy of this message | ||
Lorenzo Alberton wrote:
quipo Wed Oct 12 10:53:11 2005 EDTModified files: /pear/MDB2/MDB2/Driver/Manager ibase.php Log:- implemented listUsers() - force UPPER() case in queries - fixed error in listSequences(), introduced in last commit (please be careful!)
$query = 'SELECT RDB$GENERATOR_NAME FROM RDB$GENERATORS';
- $result = $db->queryCol($query);
- if (PEAR::isError($result)) {
- return $result;
+ $table_names = $db->queryCol($query);
+ if (PEAR::isError($table_names)) {
+ return $table_names;
+ }
+ $sequences = array();
+ for ($i = 0, $j = count($table_names); $i < $j; ++$i) {
+ if ($sqn = $this->_isSequenceName($table_names[$i]))
+ $sequences[] = $sqn;
}
Oh, I did not expect ibase to need this code. But yeah now I remember why we do need it. Guess I need to readd it to the oci8 and pgsql driver as well. Sorry about that!
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE
&& $db->options['field_case'] == CASE_LOWER
) {
- $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result);
+ $sequences = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $sequences);
}
- return $result;
+ return $sequences;
I wanted to use $result here, to make the code more similar all around.