Skip to content

插入BLOB大对象数据

使用范例

<?php
$db = new PDO('xugusql:ip=192.168.78.130;port=5138;db=SYSTEM;user=SYSDBA;pwd=SYSDBA');
$lob=fopen('/home/T/mac-002.jpg', "r");

$stmt = $db->prepare("INSERT INTO PHP_LOB VALUES(1, ?, NULL, NULL);");
$stmt->bindValue(1, $f_blob, PDO::PARAM_LOB);

$stmt->execute();
fclose($lob);
?>