maxdb_affected_rows
maxdb_bind_param
MaxDB Funções
PHP Manual

# maxdb_autocommit

# maxdb::auto_commit

(PECL maxdb >= 1.0)

maxdb_autocommit -- maxdb::auto_commit — Turns on or off auto-commiting database modifications

### Descrição

Estilo de procedimentos

bool maxdb_autocommit ( resource `$link` , bool `$mode` )

Estilo orientado a objetos

bool maxdb::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.

### Valor Retornado

Retorna `TRUE` em caso de sucesso ou `FALSE` em falhas.

### Exemplos

Exemplo #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();
?>`

Exemplo #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);
?>`

O exemplo acima irá imprimir algo similar a:

### Veja Também

- maxdb_commit() - Commits the current transaction
- maxdb_rollback() - Rolls back current transaction

maxdb_affected_rows
maxdb_bind_param
MaxDB Funções
PHP Manual