mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
imported ADOdb version 4.20 released 27 Feb 2004
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V3.94 13 Oct 2003 (c) 2000-2003 John Lim (jlim@natsoft.com.my). All rights reserved.
|
||||
V4.20 22 Feb 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). 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.
|
||||
@@ -26,6 +26,7 @@ class ADODB_sqlite extends ADOConnection {
|
||||
var $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name";
|
||||
var $sysDate = "adodb_date('Y-m-d')";
|
||||
var $sysTimeStamp = "adodb_date('Y-m-d H:i:s')";
|
||||
var $fmtTimeStamp = "'Y-m-d H:i:s'";
|
||||
|
||||
function ADODB_sqlite()
|
||||
{
|
||||
@@ -126,6 +127,8 @@ class ADODB_sqlite extends ADOConnection {
|
||||
// returns true or false
|
||||
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
|
||||
{
|
||||
if (!function_exists('sqlite_open')) return false;
|
||||
|
||||
$this->_connectionID = sqlite_open($argHostname);
|
||||
if ($this->_connectionID === false) return false;
|
||||
$this->_createFunctions();
|
||||
@@ -135,6 +138,8 @@ class ADODB_sqlite extends ADOConnection {
|
||||
// returns true or false
|
||||
function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
|
||||
{
|
||||
if (!function_exists('sqlite_open')) return false;
|
||||
|
||||
$this->_connectionID = sqlite_popen($argHostname);
|
||||
if ($this->_connectionID === false) return false;
|
||||
$this->_createFunctions();
|
||||
@@ -156,10 +161,12 @@ class ADODB_sqlite extends ADOConnection {
|
||||
{
|
||||
$offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
|
||||
$limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : '');
|
||||
return $secs2cache ?
|
||||
$this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr)
|
||||
:
|
||||
$this->Execute($sql."$limitStr$offsetStr",$inputarr);
|
||||
if ($secs2cache)
|
||||
$rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
|
||||
else
|
||||
$rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr);
|
||||
|
||||
return $rs;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user