コード例 #1
0
 protected function _fetch_lob(&$p, &$col)
 {
     $tmp_file = tempnam(sys_get_temp_dir(), 'phppdo_');
     if (!$tmp_file) {
         return false;
     }
     if (!@pg_lo_export($this->_link, $col, $tmp_file)) {
         // maybe this is a 'bytea'
         return parent::_fetch_lob($p, $col);
     }
     $p = fopen($tmp_file, 'rb');
     if ($p) {
         $this->tmp_lobs[$tmp_file] = $p;
     }
 }
コード例 #2
0
ファイル: oci_statement.php プロジェクト: Deepab23/clinic
 protected function _fetch_lob(&$p, &$col)
 {
     $tmp_file = tempnam(sys_get_temp_dir(), 'phppdo_');
     if (!$tmp_file) {
         return false;
     }
     if (is_object($col)) {
         $col->export($tmp_file);
     } else {
         return parent::_fetch_lob($p, $col);
     }
     $p = fopen($tmp_file, 'rb');
     if ($p) {
         $this->tmp_lobs[$tmp_file] = $p;
     }
 }