PHP: maxdb_autocommit - Manual

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

search for in the

maxdb_bind_param maxdb_affected_rows

Last updated: Sat, 27 Jan 2007

view this page in

# maxdb_autocommit

(PECL)

maxdb_autocommit

(no version information, might be only in CVS)

maxdb->auto_commit -- Turns on or off auto-commiting database modifications

## Description

Procedural style:

bool maxdb_autocommit ( resource link, bool mode )

Object oriented style (method)

class maxdb {
bool auto_commit ( bool mode )
}

maxdb_autocommit() is used to turn on or off auto-commit mode on queries for the database connection represented by the `link` resource.

## Return values

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

## See also

maxdb_commit(), maxdb_rollback().

## Example

Пример 1. Object oriented style

`<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* turn autocommit on */
$maxdb->autocommit(TRUE);
/* close connection */
$maxdb->close();
?>`

Пример 2. Procedural style

`<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
if (!$link) {
printf("Can't connect to localhost. Error: %s\n", maxdb_connect_error());
exit();
}
/* turn autocommit on */
maxdb_autocommit($link, TRUE);
/* close connection */
maxdb_close($link);
?>`

The above examples would produce no output.

add a note User Contributed Notes
maxdb_autocommit
There are no user contributed notes for this page.
maxdb_bind_param maxdb_affected_rows

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 09:32:46 2007 PST