Compzone.Org :: Podręcznik PHP :: PDO::commit
Pytania w drugiej edycji Testu PHP powinny być:
Trudniejsze
Łatwiejsze
Skomplikowane
Na myślenie
Do liczenia
Sonda Wyniki

Add to Google

PDO::commit

(no version information, might be only in CVS)

PDO::commit --  Commits a transaction

Opis

bool PDO::commit ( void )

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

Przykłady

Przykład 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 */
?>

Patrz także

PDO::beginTransaction()
PDO::rollBack()
Copyright © 2005-2006 Compzone.Org. Kopiowanie i wykorzystywanie materiałów zawartych na tej stronie bez zgody autora zabronione!