English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

Usage and Example of PHP odbc_autocommit () Function

PHP ODBC Reference Manual

The odbc_autocommit () function switches the automatic commit behavior.

Syntax

mixed odbc_autocommit ( resource $connection_id [, bool $OnOff = false ] )

Definition and Usage

It is used to switch the automatic commit behavior.

Return Value

Successfully returns the automatic commit status, otherwise returns 0.

By default, the automatic commit of the connection is turned on. Disabling automatic commit is equivalent to starting a transaction.

Parameter

Serial NumberParameters and Description
1

connection_id

ODBC Connection Identifier

2

OnOff

If OnOff is true, automatic commit is enabled; if false, automatic commit is disabled.

Online Example

Try the following example

<?php
   $input_ID = odbc_connect("DSN", "user", "pass");
   
   $Return = odbc_autocommit($input_ID, FALSE);
?>

PHP ODBC Reference Manual