summaryrefslogtreecommitdiff
path: root/adodb-lib.inc.php
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2022-06-30 18:40:41 +0200
committerDamien Regad <dregad@mantisbt.org>2022-07-23 11:27:10 +0200
commit0378343f5d102d1178ccf0a0d61a53139ed3c4f1 (patch)
tree8129c50534c58b70a77e7bac17e5d3f8cd711920 /adodb-lib.inc.php
parentfe174be456de4c0f8881bfa10020e90949ff81f1 (diff)
downloadadodb-0378343f5d102d1178ccf0a0d61a53139ed3c4f1.tar.gz
adodb-0378343f5d102d1178ccf0a0d61a53139ed3c4f1.tar.bz2
adodb-0378343f5d102d1178ccf0a0d61a53139ed3c4f1.zip
Remove unused / commented-out code
Diffstat (limited to 'adodb-lib.inc.php')
-rw-r--r--adodb-lib.inc.php49
1 files changed, 0 insertions, 49 deletions
diff --git a/adodb-lib.inc.php b/adodb-lib.inc.php
index 5a088b0a..816789d9 100644
--- a/adodb-lib.inc.php
+++ b/adodb-lib.inc.php
@@ -58,12 +58,6 @@ function adodb_strip_order_by($sql)
return $sql;
}
-if (false) {
- $sql = 'select * from (select a from b order by a(b),b(c) desc)';
- $sql = '(select * from abc order by 1)';
- die(adodb_strip_order_by($sql));
-}
-
function adodb_probetypes(&$array,&$types,$probe=8)
{
// probe and guess the type
@@ -836,7 +830,6 @@ function _adodb_getupdatesql(&$zthis, &$rs, $arrFields, $forceUpdate=false, $for
$discard = false;
// not a good hack, improvements?
if ($whereClause) {
- #var_dump($whereClause);
if (preg_match('/\s(ORDER\s.*)/is', $whereClause[1], $discard));
else if (preg_match('/\s(LIMIT\s.*)/is', $whereClause[1], $discard));
else if (preg_match('/\s(FOR UPDATE.*)/is', $whereClause[1], $discard));
@@ -1287,45 +1280,3 @@ function _adodb_backtrace($printOrArr=true,$levels=9999,$skippy=0,$ishtml=null)
return $s;
}
-/*
-function _adodb_find_from($sql)
-{
-
- $sql = str_replace(array("\n","\r"), ' ', $sql);
- $charCount = strlen($sql);
-
- $inString = false;
- $quote = '';
- $parentheseCount = 0;
- $prevChars = '';
- $nextChars = '';
-
-
- for($i = 0; $i < $charCount; $i++) {
-
- $char = substr($sql,$i,1);
- $prevChars = substr($sql,0,$i);
- $nextChars = substr($sql,$i+1);
-
- if((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === false) {
- $quote = $char;
- $inString = true;
- }
-
- elseif((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === true && $quote == $char) {
- $quote = "";
- $inString = false;
- }
-
- elseif($char == "(" && $inString === false)
- $parentheseCount++;
-
- elseif($char == ")" && $inString === false && $parentheseCount > 0)
- $parentheseCount--;
-
- elseif($parentheseCount <= 0 && $inString === false && $char == " " && strtoupper(substr($prevChars,-5,5)) == " FROM")
- return $i;
-
- }
-}
-*/