You are here

function DB_pgsql::autoCommit in Flickr API 5

Enables or disables automatic commits

Parameters

bool $onoff true turns it on, false turns it off:

Return value

int DB_OK on success. A DB_Error object if the driver doesn't support auto-committing transactions.

Overrides DB_common::autoCommit

File

phpFlickr/PEAR/DB/pgsql.php, line 590

Class

DB_pgsql
The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases

Code

function autoCommit($onoff = false) {

  // XXX if $this->transaction_opcount > 0, we should probably
  // issue a warning here.
  $this->autocommit = $onoff ? true : false;
  return DB_OK;
}