PHP: PDO->commit() - Manual

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

search for in the

PDO->__construct() PDO->beginTransaction()

Last updated: Sat, 27 Jan 2007

view this page in

# PDO->commit()

(no version information, might be only in CVS)

PDO->commit() -- Commits a transaction

## Описание

class PDO {
bool commit ( void )
}

Commits a transaction, returning the database connection to autocommit mode until the next call to PDO->beginTransaction() starts a new transaction.

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

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

## Примеры

Пример 1. Commit a transaction

`<?php
/* Begin a transaction, turning off autocommit */
$dbh->beginTransaction();
/* Change the database schema */
$sth = $dbh->exec("DROP TABLE fruit");
/* Commit the changes */
$dbh->commit();
/* Database connection is now back in autocommit mode */
?>`

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

PDO->beginTransaction()
PDO->rollBack()

add a note User Contributed Notes
PDO->commit()
There are no user contributed notes for this page.
PDO->__construct() PDO->beginTransaction()

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