Forum und email
PDO::pgsqlLOBUnlink

PDO::pgsqlLOBUnlink

(no version information, might be only in CVS)

PDO::pgsqlLOBUnlink -- Deletes the large object

Popis

bool PDO::pgsqlLOBUnlink ( string oid )

Deletes a large object from the database identified by OID.

Poznámka: This function must be called within a transaction.

Seznam parametrů

oid

A large object identifier

Návratové hodnoty

Vrací TRUE při úspěchu, FALSE při selhání.

Příklady

Příklad 1. A PDO::pgsqlLOBUnlink() example

This example unlinks a large object from the database prior to deleting the row that references it from the blobs table we've been using in our PDO::pgsqlLOBCreate() and PDO::pgsqlLOBOpen() examples.

<?php
$db
= new PDO('pgsql:dbname=test host=localhost', $user, $pass);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->beginTransaction();
$db->pgsqlLOBUnlink($oid);
$stmt = $db->prepare("DELETE FROM BLOBS where ident = ?");
$stmt->execute(array($some_id));
$db->commit();
?>

Viz také

PDO::pgsqlLOBOpen()
PDO::pgsqlLOBCreate()