ibase_blob_add

(PHP 5, PHP 7 < 7.4.0)

ibase_blob_addAdd data into a newly created blob

说明

ibase_blob_add ( resource $blob_handle , string $data ) : void

ibase_blob_add() adds data into a blob created with ibase_blob_create().

参数

blob_handle

A blob handle opened with ibase_blob_create().

data

The data to be added.

返回值

没有返回值。

参见

User Contributed Notes

a dot w dot peters at ieee dot org 09-Dec-2004 07:48
To actually insert the BLOB into a table, the following snippet of code shows how this can be done.

<?php
  $dbh
= ibase_connect($host, $user, $pass);

 
$blh = ibase_blob_create($dbh);
 
ibase_blob_add($blh, $data);
 
$blobid = ibase_blob_close($blh);

 
$sql = "INSERT INTO blobtable(blobfield) VALUES (?)";
 
$sth = ibase_query($dbh, $sql, $blobid);
?>
PHP8中文手册 站长在线 整理 版权归PHP文档组所有