downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<maxdb_affected_rowsmaxdb_bind_param>
Last updated: Thu, 26 Jun 2008

maxdb_autocommit

maxdb->auto_commit

(No version information available, 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)

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

Returns TRUE on success or FALSE on failure.

Examples

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

Example #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 example will output something similar to:



add a noteadd a note User Contributed Notes
Turns on or off auto-commiting database modifications
There are no user contributed notes for this page.




<maxdb_affected_rowsmaxdb_bind_param>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs