cvs: pear /MDB/MDB ibase.php
| From: | Lorenzo Alberton | Date: | Fri, 13 Jun 2003 23:29:53 +0000 |
| Subject: | cvs: pear /MDB/MDB ibase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10952@lists.php.net to get a copy of this message | ||
quipo Fri Jun 13 19:29:53 2003 EDT
Modified files:
/pear/MDB/MDB ibase.php
Log:
now LOB management works (WHOOOOHOA!!!!)
Index: pear/MDB/MDB/ibase.php
diff -u pear/MDB/MDB/ibase.php:1.6 pear/MDB/MDB/ibase.php:1.7
--- pear/MDB/MDB/ibase.php:1.6 Tue May 27 06:16:13 2003
+++ pear/MDB/MDB/ibase.php Fri Jun 13 19:29:53 2003
@@ -42,7 +42,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: ibase.php,v 1.6 2003/05/27 10:16:13 lsmith Exp $
+// $Id: ibase.php,v 1.7 2003/06/13 23:29:53 quipo Exp $
require_once('MDB/Common.php');
@@ -391,7 +391,12 @@
if (MDB::isError($connection)) {
return($connection);
}
- $this->connection = $connection;
+ $this->connection = $connection;
+
+ //the if below was added after PEAR::DB. Review me!!
+ if ($this->dbsyntax == 'fbird') {
+ $this->supported['limit'] = 'alter';
+ }
if (!$this->auto_commit && MDB::isError($trans_result =
$this->_doQuery('BEGIN'))) {
ibase_close($this->connection);
@@ -691,7 +696,6 @@
}
}
if(is_array($this->row_buffer[$result_value] = @ibase_fetch_row($result))) {
- //print_r($this->row_buffer[$result_value]);
return FALSE;
}
unset($this->row_buffer[$result_value]);
@@ -747,7 +751,7 @@
return '';
}
$this->highest_fetched_row[$result_value] =
max($this->highest_fetched_row[$result_value], $row);
- return rtrim($this->results[$result_value][$row][$column]);
+ return rtrim($this->results[$result_value][$row][$column], ' '); //clean from
trailing spaces
}
// }}}
@@ -822,8 +826,9 @@
$this->results[$result_value][$this->current_row[$result_value]+1][$key]
= rtrim($valueWithSpace);
}
}
+
}
- return(MDB_OK);
+ return MDB_OK;
}
// }}}
@@ -842,24 +847,13 @@
return($this->raiseError(MDB_ERROR, NULL, NULL,
'Retrieve LOB: it was not specified a valid lob'));
}
+
if (!isset($this->lobs[$lob]['Value'])) {
- //print_r($this->lobs[$lob]);
$this->lobs[$lob]['Value'] =
$this->fetch($this->lobs[$lob]['Result'],
$this->lobs[$lob]['Row'],
$this->lobs[$lob]['Field']);
- /*
- if ($blob_handle = @ibase_blob_open($this->lobs[$lob]['Value'])) {
- $blob_info = ibase_blob_info($row[0]);
- $blob_length = $blob_info[0];
- echo $blob = ibase_blob_get($blob_handle, $blob_length);
- ibase_blob_close($blob_handle);
- } else {
- echo $blob = 'not a blob!';
- }
- */
- //print_r($this->lobs[$lob]['Value']);
- if(!$this->lobs[$lob]['Handle'] =
ibase_blob_open($this->lobs[$lob]['Value'])) {
+ if(!$this->lobs[$lob]['Handle'] =
ibase_blob_open($this->lobs[$lob]['Value'])) {
unset($this->lobs[$lob]['Value']);
return($this->raiseError(MDB_ERROR, NULL, NULL,
'Retrieve LOB: Could not open fetched large object field' .
ibase_errmsg()));