oci_commit
(PHP 5)
oci_commit -- гЮБЕПЬЮЕР Х ОНДРБЕПФДЮЕР РПЮМГЮЙЖХЧ
нОХЯЮМХЕ
bool
oci_commit ( resource connection)
oci_commit() ГЮБЕПЬЮЕР Х ОНДРБЕПФДЮЕР РПЮМГЮЙЖХЧ,
ББНДЪ Б ДЕИЯРБХЕ БЯЕ НФХДЮЧЫХЕ SQL-БШПЮФЕМХЪ ДКЪ ЯНЕДХМЕМХЪ
connection.
Пример 1. оПХЛЕП ХЯОНКЭГНБЮМХЪ oci_commit()
<?php // Login to Oracle server $conn = oci_connect('scott', 'tiger'); // Parse SQL $stmt = oci_parse($conn, " INSERT INTO employees (name, surname) VALUES ('Maxim', 'Maletsky') ");
/* Execute statement OCI_DEFAULT tells oci_execute() not to commit statement immediately */ oci_execute($stmt, OCI_DEFAULT);
/* .... Parsing and executing other statements here ... .... */ // Commit transaction $committed = oci_commit($conn);
// Test whether commit was successful. If error occurred, return error message if (!$committed) { $error = oci_error($conn); echo 'Commit failed. Oracle reports: ' . $error['message']; }
?>
|
|
Замечание:
б БЕПЯХЪУ PHP МХФЕ 5.0.0 ЩРЮ ТСМЙЖХЪ МЮГШБЮКЮЯЭ ocicommit().
б PHP 5.0.0 Х БШЬЕ ocicommit() ЪБКЪЕРЯЪ
ЮКХЮЯНЛ oci_commit(), ОНЩРНЛС БШ ЛНФЕРЕ
ОПНДНКФЮРЭ ХЯОНКЭГНБЮРЭ ЩРН ХЛЪ, НДМЮЙН ЩРН МЕ ПЕЙНЛЕМДСЕРЯЪ.
яЛ. РЮЙФЕ oci_rollback() Х
oci_execute().
HIVE: All information for read only. Please respect copyright! |