当前位置: 首页>>代码示例>>PHP>>正文


PHP ibase_blob_close函数代码示例

本文整理汇总了PHP中ibase_blob_close函数的典型用法代码示例。如果您正苦于以下问题:PHP ibase_blob_close函数的具体用法?PHP ibase_blob_close怎么用?PHP ibase_blob_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ibase_blob_close函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: OldUpdateBlob

 function OldUpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB')
 {
     $blob_id = ibase_blob_create($this->_connectionID);
     ibase_blob_add($blob_id, $val);
     $blob_id_str = ibase_blob_close($blob_id);
     return $this->Execute("UPDATE {$table} SET {$column}=(?) WHERE {$where}", array($blob_id_str)) != false;
 }
开发者ID:kractos26,项目名称:orfeo,代码行数:7,代码来源:adodb-ibase.inc.php

示例2: close

 function close()
 {
     if (!($e = $this->_firstUse())) {
         return $e;
     }
     if ($this->blob) {
         $id = ibase_blob_close($this->blob);
         if ($id === false) {
             return $this->_setDbError('close');
         }
         $this->blob = null;
     } else {
         $id = null;
     }
     return $this->id ? $this->id : $id;
 }
开发者ID:Ambalus,项目名称:DbSimple,代码行数:16,代码来源:Blob.php

示例3: GetLOBFieldValue

 function GetLOBFieldValue($prepared_query, $parameter, $lob, &$value)
 {
     if (!$this->Connect()) {
         return 0;
     }
     $success = 1;
     if ($blob = ibase_blob_create($this->auto_commit ? $this->connection : $this->transaction_id)) {
         while (!MetabaseEndOfLOB($lob)) {
             if (MetabaseReadLOB($lob, $data, $this->lob_buffer_length) < 0) {
                 $this->SetError("Get LOB field value", MetabaseLOBError($lob));
                 $success = 0;
                 break;
             }
             if (!ibase_blob_add($blob, $data)) {
                 $this->SetError("Get LOB field value", "Could not add data to a large object: " . ibase_errmsg());
                 $success = 0;
                 break;
             }
         }
         if ($success) {
             if (GetType($value = ibase_blob_close($blob))) {
                 if (!isset($this->query_parameters[$prepared_query])) {
                     $this->query_parameters[$prepared_query] = array(0, "");
                     $this->query_parameter_values[$prepared_query] = array();
                 }
                 $query_parameter = count($this->query_parameters[$prepared_query]);
                 $this->query_parameter_values[$prepared_query][$parameter] = $query_parameter;
                 $this->query_parameters[$prepared_query][$query_parameter] = $value;
                 $value = "?";
             } else {
                 $success = 0;
             }
         }
         if (!$success) {
             ibase_blob_cancel($blob);
         }
     } else {
         $this->SetError("Get LOB field value", "Could not create a large object: " . ibase_errmsg());
         $success = 0;
     }
     return $success;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:42,代码来源:metabase_ibase.php

示例4: read

 /**
  * This function advances the reader to the next record.
  *
  * @access public
  * @override
  * @return boolean                          whether another record was fetched
  *
  * @see http://php.net/manual/en/function.ibase-blob-get.php
  */
 public function read()
 {
     $this->record = @ibase_fetch_assoc($this->command);
     if ($this->record !== FALSE) {
         foreach ($this->blobs as $field) {
             $info = @ibase_blob_info($this->resource, $this->record[$field]);
             if (is_array($info) and !$info['isnull']) {
                 $buffer = '';
                 $handle = @ibase_blob_open($this->resource, $this->record[$field]);
                 if ($handle !== FALSE) {
                     for ($i = 0; $i < $info[1]; $i++) {
                         $size = $i == $info[1] - 1 ? $info[0] - $i * $info[2] : $info[2];
                         $value = @ibase_blob_get($handle, $size);
                         if ($value !== FALSE) {
                             $buffer .= $value;
                         }
                     }
                     @ibase_blob_close($handle);
                 }
                 $this->record[$field] = $buffer;
             } else {
                 $this->record[$field] = NULL;
             }
         }
         return TRUE;
     }
     return FALSE;
 }
开发者ID:ruslankus,项目名称:invoice-crm,代码行数:37,代码来源:Standard.php

示例5: BlobDecode

 /**
 +----------------------------------------------------------
 * BLOB字段解密函数 Firebird特有
 +----------------------------------------------------------
 * @access public
 +----------------------------------------------------------
 * @param $blob 待解密的BLOB
 +----------------------------------------------------------
 * @return 二进制数据
 +----------------------------------------------------------
 * @throws ThinkExecption
 +----------------------------------------------------------
 */
 public function BlobDecode($blob)
 {
     $maxblobsize = 262144;
     $blob_data = ibase_blob_info($this->_linkID, $blob);
     $blobid = ibase_blob_open($this->_linkID, $blob);
     if ($blob_data[0] > $maxblobsize) {
         $realblob = ibase_blob_get($blobid, $maxblobsize);
         while ($string = ibase_blob_get($blobid, 8192)) {
             $realblob .= $string;
         }
     } else {
         $realblob = ibase_blob_get($blobid, $blob_data[0]);
     }
     ibase_blob_close($blobid);
     return $realblob;
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:29,代码来源:DbIbase.class.php

示例6: _destroyResultLOB

 /**
  * Free any resources allocated during the lifetime of the large object
  * handler object.
  *
  * @param int $lob handle to a lob created by the createLob() function
  * @access private
  */
 function _destroyResultLOB($lob)
 {
     $db =& $GLOBALS['_MDB2_databases'][$this->db_index];
     if (isset($db->lobs[$lob])) {
         if (isset($db->lobs[$lob]['value'])) {
             @ibase_blob_close($db->lobs[$lob]['handle']);
         }
         $db->lobs[$lob] = '';
     }
 }
开发者ID:BackupTheBerlios,项目名称:smart-svn,代码行数:17,代码来源:ibase.php

示例7: find_apprdate

<?php

$results = "";
$head = "\\SetWatermarkText{" . $watermark . "}\n";
$head .= "\\normalsize Биоматериал: КРОВЬ ИЗ ВЕНЫ\n\n ~~~~~~~~~~~~~~~~СОСКОБ\n\n\\vspace{3px}";
$head .= "\\vspace{-10px} \\begin{center}\\large{\\textbf{Gine-Mix максима}}\n\\vspace{3px}\\rule{1\\linewidth}{0.1mm} \n \\normalsize{\\textbf{Маркеры опухолевого роста}} \\vspace{-5px}  \n\n \\end{center}";
$apprdate = find_apprdate($ordersid, $dbh);
$restm = "select o.comments_pic as com from orders ord inner join ordtask o on o.ordersid = ord.id where o.testcode =1912 and ord.id in(" . $ordersid . ")";
$row = ibase_query($restm);
$data = ibase_fetch_object($row);
$blob_data = ibase_blob_info($data->COM);
$blob_hndl = ibase_blob_open($data->COM);
$comments = ibase_blob_get($blob_hndl, $blob_data[0]);
$comments = str_replace('%', '\\%', $comments);
$comments = str_replace('_', '\\_', $comments);
ibase_blob_close($blob_hndl);
ibase_free_result($row);
$results .= "\n\n" . $comments;
$apprusergist = "";
$restm = "select  u.fullname from ordtask o inner join users u on u.usernam = o.appruser inner join tests t on t.id = o.testcode  where o.ordersid in(" . $ordersid . ") and t.dept =4";
$res = ibase_query($dbh, $restm);
while ($row = ibase_fetch_row($res)) {
    $apprusergist .= $row[0];
}
ibase_free_result($res);
$apprpcr = "";
$restm = "select  u.fullname from ordtask o inner join users u on u.usernam = o.appruser inner join tests t on t.id = o.testcode  where o.ordersid in(" . $ordersid . ") and t.dept =3";
$res = ibase_query($dbh, $restm);
while ($row = ibase_fetch_row($res)) {
    $apprpcr .= $row[0];
}
开发者ID:KhasanOrsaev,项目名称:work_nacpp,代码行数:31,代码来源:form37.php

示例8: go_upload

 function go_upload($pid = '')
 {
     //$this->config_upload();
     //$ext = $this->findexts($_FILES['Filedata']['name']);
     //$config['upload_path'] = base_url().'assets/data_upload/rapat/'.basename($_FILES['Filedata']['name']);
     //$config['upload_path'] = $_SERVER["DOCUMENT_ROOT"].'uploads/'.basename($_FILES['Filedata']['name']);
     //$config['upload_path'] = $_SERVER["DOCUMENT_ROOT"].'uploads/'.$new_name;
     $config['upload_path'] = './uploads/';
     //$config['upload_path'] = $_SERVER["DOCUMENT_ROOT"].'uploads';
     $config['allowed_types'] = 'gif|jpg|png|pdf';
     //$config['max_size']	= '100';
     //$config['max_width']  = '1024';
     //$config['max_height']  = '768';
     $this->load->library('upload', $config);
     $this->upload->initialize($config);
     $ext = $this->upload->get_extension($_FILES['Filedata']['name']);
     $new_name = date('d.m.Y.H.i.s') . $ext;
     $blh = ibase_blob_create($this->db->conn_id);
     ibase_blob_add($blh, file_get_contents($_FILES['Filedata']['tmp_name']));
     $blobid = ibase_blob_close($blh);
     $is_upload = TRUE;
     if (!@copy($_FILES['Filedata']['tmp_name'], $this->upload->upload_path . $new_name)) {
         if (!@move_uploaded_file($_FILES['Filedata']['tmp_name'], $this->upload->upload_path . $new_name)) {
             $is_upload = FALSE;
         }
     }
     //if (!$this->upload->do_upload('Filedata'))
     //if(!move_uploaded_file($_FILES['Filedata']['tmp_name'], $_SERVER["DOCUMENT_ROOT"].'uploads/'))
     //if(!move_uploaded_file($_FILES['Filedata']['tmp_name'], $this->upload->upload_path))
     if (!$is_upload) {
         $error = $this->upload->display_errors();
         //$this->session->set_flashdata('error','<div class="error">'.$error.'</div>');
         echo $error;
     } else {
         //$this->load->model('rapat_file_model','file_rapat');
         $id_rapat = isset($pid) ? $pid : $this->uri->segment('3');
         $data = array('id_rapat' => $id_rapat, 'nama_file' => $_FILES['Filedata']['name'], 'lokasi_file' => $this->upload->upload_path, 'nama_tmp' => $new_name, 'data_file' => $_FILES['Filedata']['tmp_name'], 'tipe_file' => $ext);
         $query = 'insert into rapat_file(id_rapat,nama_file,nama_tmp,data_file,lokasi_file,tipe_file) values(' . $this->db->escape($data['id_rapat']) . ',' . $this->db->escape($data['nama_file']) . ',' . $this->db->escape($data['nama_tmp']) . ',?,' . $this->db->escape($data['lokasi_file']) . ',' . $this->db->escape($data['tipe_file']) . ')';
         $this->db->trans_start();
         $insert = ibase_query($this->db->conn_id, $query, $blobid);
         $this->db->trans_complete();
         //$this->file_rapat->insert_data($data);
         //$file = $this->upload->data();
         //$file_list[] = array(
         //'name' => $CI->upload->file_name,
         //'file' => $CI->upload->upload_path.$CI->upload->file_name,
         //'size' => $CI->upload->file_size,
         //'type' => $CI->upload->file_type,
         //'ext' => $CI->upload->file_ext,
         /*Array
         		(
         			[Filedata] => Array
         			(
         				[name] => 2319233390_62fbfac7f5_b.jpg
         				[type] => application/octet-stream
         				[tmp_name] => C:\xampp\tmp\php2096.tmp
         				[error] => 0
         				[size] => 143337
         			)
         		)*/
     }
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:62,代码来源:rapat.php

示例9: _destroyLOB

 /**
  * Free any resources allocated during the lifetime of the large object
  * handler object.
  *
  * @param array $lob array
  * @access protected
  */
 function _destroyLOB(&$lob)
 {
     if (isset($lob['handle'])) {
         @ibase_blob_close($lob['handle']);
         unset($lob['handle']);
     }
 }
开发者ID:TheSkyNet,项目名称:railoapacheportable,代码行数:14,代码来源:ibase.php

示例10: _getNavigationData


//.........这里部分代码省略.........
         $this->putCountCache($output->tables, $condition, $total_count);
     }
     $list_count = $output->list_count['value'];
     if (!$list_count) {
         $list_count = 20;
     }
     $page_count = $output->page_count['value'];
     if (!$page_count) {
         $page_count = 10;
     }
     $page = $output->page['value'];
     if (!$page) {
         $page = 1;
     }
     // 전체 페이지를 구함
     if ($total_count) {
         $total_page = (int) (($total_count - 1) / $list_count) + 1;
     } else {
         $total_page = 1;
     }
     // 페이지 변수를 체크
     if ($page > $total_page) {
         $page = $total_page;
     }
     $start_count = ($page - 1) * $list_count;
     // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가
     if ($output->order) {
         $conditions = $this->getConditionList($output);
         if (!in_array('list_order', $conditions) && !in_array('update_order', $conditions)) {
             foreach ($output->order as $key => $val) {
                 $col = $val[0];
                 if (!in_array($col, array('list_order', 'update_order'))) {
                     continue;
                 }
                 if ($condition) {
                     $condition .= sprintf(' and "%s" < 2100000000 ', $col);
                 } else {
                     $condition = sprintf(' where "%s" < 2100000000 ', $col);
                 }
             }
         }
     }
     $limit = sprintf('FIRST %d SKIP %d ', $list_count, $start_count);
     $query = sprintf('SELECT %s %s FROM %s %s %s', $limit, $columns, implode(',', $table_list), implode(' ', $left_join), $condition);
     if (strlen($query_groupby)) {
         $query .= $query_groupby;
     }
     if ($output->order) {
         foreach ($output->order as $key => $val) {
             $index_list[] = sprintf("%s %s", $this->autoQuotes($val[0]), $val[1]);
         }
         if (count($index_list)) {
             $query .= sprintf(" ORDER BY %s", implode(",", $index_list));
         }
     }
     $query .= ";";
     $result = $this->_query($query);
     if ($this->isError()) {
         if (!$this->transaction_started) {
             @ibase_rollback($this->fd);
         }
         $buff = new Object();
         $buff->total_count = 0;
         $buff->total_page = 0;
         $buff->page = 1;
         $buff->data = array();
         $buff->page_navigation = new PageHandler($total_count, $total_page, $page, $page_count);
         return $buff;
     }
     $virtual_no = $total_count - ($page - 1) * $list_count;
     while ($tmp = ibase_fetch_object($result)) {
         foreach ($tmp as $key => $val) {
             $type = $output->column_type[$key];
             if ($type == null) {
                 foreach ($output->columns as $cols) {
                     if ($cols['alias'] == $key) {
                         $type = $output->column_type[$cols['name']];
                     }
                 }
             }
             if ($type == "text" || $type == "bigtext") {
                 $blob_data = ibase_blob_info($tmp->{$key});
                 $blob_hndl = ibase_blob_open($tmp->{$key});
                 $tmp->{$key} = ibase_blob_get($blob_hndl, $blob_data[0]);
                 ibase_blob_close($blob_hndl);
             }
         }
         $data[$virtual_no--] = $tmp;
     }
     if (!$this->transaction_started) {
         @ibase_commit($this->fd);
     }
     $buff = new Object();
     $buff->total_count = $total_count;
     $buff->total_page = $total_page;
     $buff->page = $page;
     $buff->data = $data;
     $buff->page_navigation = new PageHandler($total_count, $total_page, $page, $page_count);
     return $buff;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:101,代码来源:DBFirebird.class.php

示例11: save_image

 function save_image($id, $count)
 {
     $config['upload_path'] = './uploads/';
     $config['allowed_types'] = 'gif|jpg|png';
     //$config['max_size']	= '100';
     //$config['max_width']  = '1024';
     //$config['max_height']  = '768';
     $this->load->library('upload', $config);
     foreach ($_FILES as $field => $value) {
         if (!$this->upload->do_upload($field)) {
             $error = array('error' => $this->upload->display_errors());
             $this->firephp->log($error, 'upload gagal');
         } else {
             $data = array('upload_data' => $this->upload->data());
             $path_content = $data['upload_data']['full_path'];
             $path_content = str_replace('/', '\\', $path_content);
             $xx = $this->db->conn_id;
             if ($path_content != '') {
                 $blh = ibase_blob_create($xx);
                 ibase_blob_add($blh, file_get_contents($path_content));
                 $query = 'insert into foto(ASET_ID,DATAFOTO,THUMBFOTO,MEDIUMFOTO) values(' . $id . ',?,?,?)';
             }
             $blobid = ibase_blob_close($blh);
             if (ibase_query($xx, $query, $blobid, $blobid, $blobid)) {
                 $this->firephp->log('tersimpan');
             } else {
                 $this->firephp->log('tidak tersimpan');
             }
         }
     }
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:aset.php

示例12: getData

 public function getData()
 {
     $blobId = ibase_blob_create();
     ibase_blob_add($blobId, $this->binary);
     return ibase_blob_close($blobId);
 }
开发者ID:reoring,项目名称:sabel,代码行数:6,代码来源:Blob.php

示例13: gcms_query

        } else {
            $csql .= ',null,null)';
            gcms_query($csql);
        }
    } else {
        $csql = 'update info_pemda set ' . 'kode_lokasi=' . quote_smart($_REQUEST['kodeLokasi']) . ',' . 'opt_kab=' . quote_smart($_REQUEST['kabKota']) . ',' . 'pejabat=' . quote_smart($_REQUEST['pejabat']) . ',' . 'pemda_alamat=' . quote_smart($_REQUEST['alamat']) . ',' . 'pemda_kabupaten=' . quote_smart($_REQUEST['namaKab']) . ',' . 'ibu_kota=' . quote_smart($_REQUEST['ibukotaKab']) . ',' . 'pemda_telp=' . quote_smart($_REQUEST['telp']) . ',' . 'pemda_fax=' . quote_smart($_REQUEST['fax']) . ',' . 'nama_bank=' . quote_smart($_REQUEST['namaBank']) . ',' . 'no_rekening=' . quote_smart($_REQUEST['noRek']);
        if (!empty($_FILES['logo']['tmp_name'])) {
            $tmpName = $_FILES['logo']['tmp_name'];
            //$fileSize = filesize($tmpName);
            $fileType = $_FILES['logo']['type'];
            global $fbdb;
            $blh = ibase_blob_create($fbdb);
            if ($_FILES['logo']['tmp_name'] != '') {
                ibase_blob_add($blh, file_get_contents($_FILES['logo']['tmp_name']));
            }
            $blobid = ibase_blob_close($blh);
            $csql .= ",logo=?,tipe_gambar='" . $fileType . "'";
            $target_file = './images/pemda/' . basename($_FILES['logo']['name']);
            if (!move_uploaded_file($_FILES['logo']['tmp_name'], $target_file)) {
                echo "File Gambar Gagal Di upload";
            }
            ibase_query($fbdb, $csql, $blobid);
        } else {
            $csql .= ',logo=null,tipe_gambar=null';
            gcms_query($sql);
        }
    }
}
unset($_FILES['logo']);
$csql = "select * from info_pemda";
$nresult = gcms_query($csql);
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:master_pemda.php

示例14: _getLobValue

 /**
  * Convert a text value into a DBMS specific format that is suitable to
  * compose query statements.
  *
  * @param resource  $prepared_query query handle from prepare()
  * @param           $parameter
  * @param           $lob
  * @return string text string that represents the given argument value in
  *      a DBMS specific format.
  * @access private
  */
 function _getLobValue($prepared_query, $parameter, $lob)
 {
     if (MDB::isError($connect = $this->connect())) {
         return $connect;
     }
     $value = '';
     // DEAL WITH ME
     if (!($this->transaction_id = @ibase_trans(IBASE_COMMITTED, $this->connection))) {
         return $this->raiseError(MDB_ERROR, NULL, NULL, '_getLobValue: Could not start a new transaction: ' . @ibase_errmsg());
     }
     if ($lo = @ibase_blob_create($this->auto_commit ? $this->connection : $this->transaction_id)) {
         while (!$this->endOfLob($lob)) {
             if (MDB::isError($result = $this->readLob($lob, $data, $this->options['lob_buffer_length']))) {
                 break;
             }
             if (@ibase_blob_add($lo, $data) === false) {
                 $result = $this->raiseError(MDB_ERROR, NULL, NULL, '_getLobValue - Could not add data to a large object: ' . @ibase_errmsg());
                 break;
             }
         }
         if (MDB::isError($result)) {
             @ibase_blob_cancel($lo);
         } else {
             $value = @ibase_blob_close($lo);
         }
     } else {
         $result = $this->raiseError(MDB_ERROR, NULL, NULL, 'Get LOB field value' . @ibase_errmsg());
     }
     if (!isset($this->query_parameters[$prepared_query])) {
         $this->query_parameters[$prepared_query] = array(0, '');
         $this->query_parameter_values[$prepared_query] = array();
     }
     $query_parameter = count($this->query_parameters[$prepared_query]);
     $this->query_parameter_values[$prepared_query][$parameter] = $query_parameter;
     $this->query_parameters[$prepared_query][$query_parameter] = $value;
     $value = '?';
     if (!$this->auto_commit) {
         $this->commit();
     }
     return $value;
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:52,代码来源:ibase.php

示例15: get_blob

 /**
  * Get the content of a blob field
  *
  * @access	public
  * @param	field
  * @return	string
  */
 function get_blob($field)
 {
     $s = '';
     if (isset($field)) {
         $blob_data = ibase_blob_info($field);
         $blob_hndl = ibase_blob_open($field);
         $s = ibase_blob_get($blob_hndl, $blob_data[0]);
         ibase_blob_close($blob_hndl);
     }
     return $s;
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:18,代码来源:firebird_driver.php


注:本文中的ibase_blob_close函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。