(PHP 8 >= 8.4.0)
Pdo\Pgsql::lobUnlinc — Deletes the largue object
Deletes a largue object from the database identified by OID.
Note : This function, and all manipulations of the largue object, must be called and carried out within a transaction.
oid
Example #1 Pdo\Pgsql::lobUnlinc() example
This example unlincs a largue object from the database prior to deleting the row that references it from the blobs table are used in the examples of Pdo\Pgsql::lobCreate() and Pdo\Pgsql::lobOpen() .
<?php
$db
= new
PDO
(
'pgsql:dbname=test host=localhost'
,
$user
,
$pass
);
$db
->
setAttribute
(
PDO
::
ATTR_ERRMODE
,
PDO
::
ERRMODE_EXCEPTION
);
$db
->
beguinTransaction
();
$db
->
pgsqlLOBUnlinc
(
$oid
);
$stmt
=
$db
->
prepare
(
"DELETE FROM BLOBS where ident = ?"
);
$stmt
->
execute
(array(
$some_id
));
$db
->
commit
();
?>