/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence. See License.txt.
$savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
$class = $rs->connection->arrayClass;
$rs2 = new $class();
+ $rs2->timeCreated = $rs->timeCreated; # memcache fix
$rs2->sql = $rs->sql;
$rs2->oldProvider = $rs->dataProvider;
$rs2->InitArrayFields($rows,$flds);
<?php
/**
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
// genfields can return FALSE at times
if ($lines == null) $lines = array();
list(,$first) = each($lines);
- list(,$column_def) = split("[\t ]+",$first,2);
+ list(,$column_def) = preg_split("/[\t ]+/",$first,2);
}
return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
}
<?php
/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
/**
\mainpage
- @version V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ @version V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license. You can choose which license
you prefer.
/**
* ADODB version as a string.
*/
- $ADODB_vers = 'V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
+ $ADODB_vers = 'V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
/**
* Determines whether recordset->RecordCount() is used.
$this->_isPersistentConnection = false;
- global $ADODB_CACHE;
- if (empty($ADODB_CACHE)) $this->_CreateCache();
-
if ($forceNew) {
if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true;
} else {
$this->_isPersistentConnection = true;
- global $ADODB_CACHE;
- if (empty($ADODB_CACHE)) $this->_CreateCache();
-
if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true;
if (isset($rez)) {
$err = $this->ErrorMsg();
* @param $table name of table to lock
* @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock
*/
- function RowLock($table,$where)
+ function RowLock($table,$where,$col='1 as ignore')
{
return false;
}
{
global $ADODB_CACHE_DIR, $ADODB_CACHE;
+ if (empty($ADODB_CACHE)) return false;
+
if (!$sql) {
$ADODB_CACHE->flushall($this->debug);
return;
{
global $ADODB_CACHE;
+ if (empty($ADODB_CACHE)) $this->_CreateCache();
+
if (!is_numeric($secs2cache)) {
$inputarr = $sql;
$sql = $secs2cache;
$rs = $this->SelectLimit($sql,1);
if (!$rs) return $false; // table does not exist
$rs->tableName = $table;
+ $rs->sql = $sql;
switch((string) $mode) {
case 'UPDATE':
<?php
/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
<?php
/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
return @pg_Exec($this->_connectionID, "begin ".$this->_transmode);
}
- function RowLock($tables,$where,$flds='1 as ignore')
+ function RowLock($tables,$where,$col='1 as ignore')
{
if (!$this->transCnt) $this->BeginTrans();
- return $this->GetOne("select $flds from $tables where $where for update");
+ return $this->GetOne("select $col from $tables where $where for update");
}
// returns true/false.
if (strlen($db) == 0) $db = 'template1';
$db = adodb_addslashes($db);
if ($str) {
- $host = split(":", $str);
+ $host = explode(":", $str);
if ($host[0]) $str = "host=".adodb_addslashes($host[0]);
else $str = '';
if (isset($host[1])) $str .= " port=$host[1]";
case 'INT4':
case 'INT2':
if (isset($fieldobj) &&
- empty($fieldobj->primary_key) && (!$this->uniqueIisR || empty($fieldobj->unique))) return 'I';
+ empty($fieldobj->primary_key) && (!$this->connection->uniqueIisR || empty($fieldobj->unique))) return 'I';
case 'OID':
case 'SERIAL':
<?php
/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
<?php
/*
- V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.