PHP: PDO::pgsqlLOBUnlink - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Printer PDO::pgsqlLOBOpen

Last updated: Sat, 27 Jan 2007

view this page in

# PDO::pgsqlLOBUnlink

(no version information, might be only in CVS)

PDO::pgsqlLOBUnlink -- Deletes the large object

## Описание

bool PDO::pgsqlLOBUnlink ( string oid )

Deletes a large object from the database identified by OID.

> Замечание: This function must be called within a transaction.

## Список параметров

`oid`

  A large object identifier

## Возвращаемые значения

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

## Примеры

Пример 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();
?>`

## Смотрите также

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

add a note User Contributed Notes
PDO::pgsqlLOBUnlink
There are no user contributed notes for this page.
Printer PDO::pgsqlLOBOpen

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST