imported ADOdb version 4.20 released 27 Feb 2004

This commit is contained in:
Ralf Becker
2004-03-15 22:17:52 +00:00
parent d8c602e654
commit 3df33d3ef6
127 changed files with 8961 additions and 2388 deletions

View File

@ -1,7 +1,7 @@
<?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. See License.txt.
@ -71,8 +71,21 @@ class perf_mssql extends adodb_perf{
$this->conn =& $conn;
}
function Explain($sql)
function Explain($sql,$partial=false)
{
$save = $this->conn->LogSQL(false);
if ($partial) {
$sqlq = $this->conn->qstr($sql.'%');
$arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq");
if ($arr) {
foreach($arr as $row) {
$sql = reset($row);
if (crc32($sql) == $partial) break;
}
}
}
$s = '<p><b>Explain</b>: '.htmlspecialchars($sql).'</p>';
$this->conn->Execute("SET SHOWPLAN_ALL ON;");
$sql = str_replace('?',"''",$sql);
@ -96,7 +109,7 @@ class perf_mssql extends adodb_perf{
}
$this->conn->Execute("SET SHOWPLAN_ALL OFF;");
$this->conn->LogSQL($save);
$s .= $this->Tracer($sql);
return $s;
}