(PECL maxdb >= 1.0)
Turns on or off auto-commiting database modifications
bool maxdb_autocommit ( resource $link, bool $mode )
Procedural style
Object oriented style
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.
Returns:
Returns TRUE
on success or FALSE
on failure.
Examples:
Object oriented style
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?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(); ?> |
Procedural style
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?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 ); ?> |
See also:
Please login to continue.