本文整理汇总了PHP中ifx_create_blob函数的典型用法代码示例。如果您正苦于以下问题:PHP ifx_create_blob函数的具体用法?PHP ifx_create_blob怎么用?PHP ifx_create_blob使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ifx_create_blob函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpdateBlob
function UpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB')
{
$type = $blobtype == 'TEXT' ? 1 : 0;
$blobid = ifx_create_blob($type, 0, $val);
return $this->Execute("UPDATE {$table} SET {$column}=(?) WHERE {$where}", array($blobid));
}
示例2: execWithBlobProcessing
/**
* Execute an SQL query with blob fields processing
* @param String sql
* @param Array blobs
* @param Array blobTypes
* @return Boolean
*/
public function execWithBlobProcessing($sql, $blobs, $blobTypes = array())
{
if (!count($blobs)) {
$this->exec($sql);
return;
}
$blobidarray = array();
foreach ($blobs as $fname => $fvalue) {
if (IsTextType($blobTypes[$fname])) {
$blob_type = 1;
} else {
$blob_type = 0;
}
$blobidarray[] = ifx_create_blob($blob_type, 0, $fvalue);
}
return @ifx_query($sql, $this->conn, $blobidarray);
}
示例3: GetLOBFieldValue
function GetLOBFieldValue($prepared_query, $parameter, $lob, &$value, $binary)
{
if (!$this->Connect(0)) {
return 0;
}
for ($blob_data = ""; !MetabaseEndOfLOB($lob);) {
if (MetabaseReadLOB($lob, $data, $this->lob_buffer_length) < 0) {
return $this->SetError("Get LOB field value", MetabaseLOBError($lob));
}
$blob_data .= $data;
}
if (!($blob = ifx_create_blob($binary ? 0 : 1, 0, $blob_data))) {
return $this->SetIFXError("Get LOB field value", "Could not create a blob");
}
if (!isset($this->query_parameters[$prepared_query])) {
$this->query_parameters[$prepared_query] = $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] = $blob;
$value = "?";
return 1;
}
示例4: UpdateBlob
function UpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB')
{
$type = ($blobtype == 'TEXT') ? 1 : 0;
$blobid = ifx_create_blob($type,0,$val);
return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blobid));
}