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

search for in the

maxdb_bind_param> <maxdb_affected_rows
[edit] Last updated: Fri, 17 May 2013

view this page in

maxdb_autocommit

maxdb::auto_commit

(PECL maxdb >= 1.0)

maxdb_autocommit -- maxdb::auto_commitTurns on or off auto-commiting database modifications

Descrierea

Stil procedural

bool maxdb_autocommit ( resource $link , bool $mode )

Stil obiect-orientat

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.

Valorile întoarse

Întoarce valoarea TRUE în cazul succesului sau FALSE în cazul eșecului.

Exemple

Example #1 Stil obiect-orientat

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

Example #2 Stil procedural

<?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($linkTRUE);

/* close connection */
maxdb_close($link);
?>

Exemplul de mai sus va afișa ceva similar cu:

Vedeți de asemenea



add a note add a note User Contributed Notes maxdb_autocommit - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites