<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Latest version is available at http://adodb.sourceforge.net
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Latest version is available at http://adodb.sourceforge.net
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
case 'EXECUTE':
$this->sql = is_array($p1) ? $p1[0] : $p1;
$this->params = $p2;
- $s = "$dbms error: [$errno: $errmsg] in $fn(\"$this->sql\")\n";
+ $s = "$dbms error: [$errno: $errmsg] in $fn(\"$this->sql\")";
break;
case 'PCONNECT':
case 'CONNECT':
$user = $thisConnection->user;
- $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n";
+ $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)";
break;
default:
- $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
+ $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
break;
}
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
$ADODB_INCLUDED_LIB = 1;
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
if ( strpos($sql, '_ADODB_COUNT') !== FALSE ) {
$rewritesql = preg_replace('/^\s*?SELECT\s+_ADODB_COUNT(.*)_ADODB_COUNT\s/is','SELECT COUNT(*) ',$sql);
} else {
- $rewritesql = preg_replace('/^\s*?SELECT\s.*?\s+(.*?)\s+FROM\s/is','SELECT COUNT(*) FROM ',$sql);
+ $rewritesql = preg_replace('/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql);
}
// fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails
// with mssql, access and postgresql. Also a good speedup optimization - skips sorting!
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
ADOdb Date Library, part of the ADOdb abstraction library
Download: http://adodb.sourceforge.net/#download
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Destroys the object
*/
function destroy() {
- unset( $this );
}
/**
switch( $this->currentElement ) {
case 'INDEX':
if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
- xml_set_object( $parser, $this->addIndex( $attributes ) );
+ $index = $this->addIndex( $attributes );
+ xml_set_object( $parser, $index );
}
break;
case 'DATA':
if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
- xml_set_object( $parser, $this->addData( $attributes ) );
+ $data = $this->addData( $attributes );
+ xml_set_object( $parser, $data );
}
break;
case 'DROP':
function Destroy() {
ini_set("magic_quotes_runtime", $this->mgq );
#set_magic_quotes_runtime( $this->mgq );
- unset( $this );
}
}
* Destroys the object
*/
function destroy() {
- unset( $this );
}
/**
switch( $this->currentElement ) {
case 'INDEX':
if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
- xml_set_object( $parser, $this->addIndex( $attributes ) );
+ $index = $this->addIndex( $attributes );
+ xml_set_object( $parser, $index );
}
break;
case 'DATA':
if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
- xml_set_object( $parser, $this->addData( $attributes ) );
+ $data = $this->addData( $attributes );
+ xml_set_object( $parser, $data );
}
break;
case 'DROP':
function Destroy() {
ini_set("magic_quotes_runtime", $this->mgq );
#set_magic_quotes_runtime( $this->mgq );
- unset( $this );
}
}
/**
\mainpage
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
if (!defined('_ADODB_LAYER')) {
define('_ADODB_LAYER',1);
+ // The ADOdb extension is no longer maintained and effectively unsupported
+ // since v5.04. The library will not function properly if it is present.
+ if(defined('ADODB_EXTENSION')) {
+ $msg = "Unsupported ADOdb Extension (v" . ADODB_EXTENSION . ") detected! "
+ . "Disable it to use ADOdb";
+
+ $errorfn = defined('ADODB_ERROR_HANDLER') ? ADODB_ERROR_HANDLER : false;
+ if ($errorfn) {
+ $conn = false;
+ $errorfn('ADOdb', basename(__FILE__), -9999, $msg, null, null, $conn);
+ } else {
+ die($msg . PHP_EOL);
+ }
+ }
+
//==============================================================================================
// CONSTANT DEFINITIONS
//==============================================================================================
/**
* ADODB version as a string.
*/
- $ADODB_vers = 'v5.20.3 01-Jan-2016';
+ $ADODB_vers = 'v5.20.7 20-Sep-2016';
/**
* Determines whether recordset->RecordCount() is used.
}
if (isset($rez)) {
$err = $this->ErrorMsg();
+ $errno = $this->ErrorNo();
if (empty($err)) {
$err = "Connection error to server '$argHostname' with user '$argUsername'";
}
- $ret = false;
} else {
$err = "Missing extension for ".$this->dataProvider;
- $ret = 0;
+ $errno = 0;
}
if ($fn = $this->raiseErrorFn) {
- $fn($this->databaseType,'CONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this);
+ $fn($this->databaseType, 'CONNECT', $errno, $err, $this->host, $this->database, $this);
}
$this->_connectionID = false;
if ($this->debug) {
ADOConnection::outp( $this->host.': '.$err);
}
- return $ret;
+ return false;
}
function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) {
$sqlarr = explode('?',$sql);
$nparams = sizeof($sqlarr)-1;
+ if (!$array_2d) {
+ // When not Bind Bulk - convert to array of arguments list
+ $inputarr = array($inputarr);
+ } else {
+ // Bulk bind - Make sure all list of params have the same number of elements
+ $countElements = array_map('count', $inputarr);
+ if (1 != count(array_unique($countElements))) {
+ $this->outp_throw(
+ "[bulk execute] Input array has different number of params [" . print_r($countElements, true) . "].",
+ 'Execute'
+ );
+ return false;
+ }
+ unset($countElements);
+ }
// Make sure the number of parameters provided in the input
// array matches what the query expects
- if ($nparams != count($inputarr)) {
+ $element0 = reset($inputarr);
+ if ($nparams != count($element0)) {
$this->outp_throw(
- "Input array has " . count($inputarr) .
+ "Input array has " . count($element0) .
" params, does not match query: '" . htmlspecialchars($sql) . "'",
'Execute'
);
return false;
}
- if (!$array_2d) {
- $inputarr = array($inputarr);
- }
+ // clean memory
+ unset($element0);
foreach($inputarr as $arr) {
$sql = ''; $i = 0;
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
-* @version v5.20.3 01-Jan-2016
+* @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
is running. All associated result memory for the specified result identifier will automatically be freed. */
function _close()
{
- if($this->_queryID) {
+ if(is_object($this->_queryID)) {
$rez = sqlsrv_free_stmt($this->_queryID);
$this->_queryID = false;
return $rez;
<?php
/**
-* @version v5.20.3 01-Jan-2016
+* @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
$argUsername,
$argPassword,
$argDatabasename,
- $this->port,
+ # PHP7 compat: port must be int. Use default port if cast yields zero
+ (int)$this->port != 0 ? (int)$this->port : 3306,
$this->socket,
$this->clientFlags);
//if results are attached to this pointer from Stored Proceedure calls, the next standard query will die 2014
//only a problem with persistant connections
- if($this->connection->_connectionID) {
+ if(isset($this->connection->_connectionID) && $this->connection->_connectionID) {
while(mysqli_more_results($this->connection->_connectionID)){
mysqli_next_result($this->connection->_connectionID);
}
}
- if($this->_queryID) {
+ if($this->_queryID instanceof mysqli_result) {
mysqli_free_result($this->_queryID);
}
$this->_queryID = false;
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
--- /dev/null
+<?php
+/*
+ @version v5.21.0-dev ??-???-2016
+ @copyright (c) 2015 Damien Regad, Mark Newnham and the ADOdb community
+ 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.
+ Set tabs to 4.
+
+ Microsoft SQL Server 2012 via ODBC
+*/
+
+if (!defined('ADODB_DIR'))
+ die();
+
+include_once(ADODB_DIR."/drivers/adodb-odbc_mssql.inc.php");
+
+class ADODB_odbc_mssql2012 extends ADODB_odbc_mssql
+{
+ /*
+ * Makes behavior similar to prior versions of SQL Server
+ */
+ var $connectStmt = 'SET CONCAT_NULL_YIELDS_NULL ON';
+}
+
+class ADORecordSet_odbc_mssql2012 extends ADORecordSet_odbc_mssql
+{
+}
\ No newline at end of file
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
$this->_driver->_connectionID = $this->_connectionID;
$this->_UpdatePDO();
+ $this->_driver->database = $this->database;
return true;
}
$this->_driver = new ADODB_pdo_base();
return $this->_driver->OffsetDate($dayFraction,$date);
}
+ function SelectDB($dbName)
+ {
+ return $this->_driver->SelectDB($dbName);
+ }
+
+ function SQLDate($fmt, $col=false)
+ {
+ return $this->_driver->SQLDate($fmt, $col);
+ }
+
function ErrorMsg()
{
if ($this->_errormsg !== false) {
{
return ($this->_connectionID) ? $this->_connectionID->lastInsertId() : 0;
}
+
+ /**
+ * Quotes a string to be sent to the database.
+ * If we have an active connection, delegates quoting to the underlying
+ * PDO object. Otherwise, replace "'" by the value of $replaceQuote (same
+ * behavior as mysqli driver)
+ * @param string $s The string to quote
+ * @param boolean $magic_quotes If false, use PDO::quote().
+ * @return string Quoted string
+ */
+ function qstr($s, $magic_quotes = false)
+ {
+ if (!$magic_quotes) {
+ if ($this->_connectionID) {
+ return $this->_connectionID->quote($s);
+ }
+ return "'" . str_replace("'", $this->replaceQuote, $s) . "'";
+ }
+
+ // undo magic quotes for "
+ $s = str_replace('\\"', '"', $s);
+ return "'$s'";
+ }
+
}
class ADODB_pdo_base extends ADODB_pdo {
}
//adodb_pr($arr);
$o->name = $arr['name'];
- if (isset($arr['native_type']) && $arr['native_type'] <> "null") {
- $o->type = $arr['native_type'];
- }
- else {
- $o->type = adodb_pdo_type($arr['pdo_type']);
- }
+ if (isset($arr['sqlsrv:decl_type']) && $arr['sqlsrv:decl_type'] <> "null")
+ {
+ /*
+ * If the database is SQL server, use the native built-ins
+ */
+ $o->type = $arr['sqlsrv:decl_type'];
+ }
+ elseif (isset($arr['native_type']) && $arr['native_type'] <> "null")
+ {
+ $o->type = $arr['native_type'];
+ }
+ else
+ {
+ $o->type = adodb_pdo_type($arr['pdo_type']);
+ }
+
$o->max_length = $arr['len'];
$o->precision = $arr['precision'];
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
{
$save = $this->metaTablesSQL;
if ($showSchema && is_string($showSchema)) {
- $this->metaTablesSQL .= " from $showSchema";
+ $this->metaTablesSQL .= $this->qstr($showSchema);
+ } else {
+ $this->metaTablesSQL .= 'schema()';
}
if ($mask) {
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
reserved.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/*
-@version v5.20.3 01-Jan-2016
+@version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/**
- * @version v5.20.3 01-Jan-2016
+ * @version v5.20.7 20-Sep-2016
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
<?php
/*
- @version v5.20.3 01-Jan-2016
+ @version v5.20.7 20-Sep-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.