Permalink
Browse files

Update API/DB/DRIVERS/MYSQL/DAVE.php

  • Loading branch information...
1 parent 49b59fa commit 04de58c988dfb689a6b35e299ae0366020dee66c @evantahler committed Mar 8, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 API/DB/DRIVERS/MYSQL/DAVE.php
@@ -346,6 +346,8 @@ function _VIEW($Table, $VARS = null, $Settings = null )
{
$SQL .= $sort;
}
+ $UpperLimit = CheckForSpecialStrings($UpperLimit);
+ $LowerLimit = CheckForSpecialStrings($LowerLimit);
if ($UpperLimit < $LowerLimit) { return array(false,"UpperLimit must be greater than LowerLimit"); }
elseif ($LowerLimit !== "" && $UpperLimit !== "" && $LowerLimit != $UpperLimit) { $SQL .= " LIMIT ".$LowerLimit.",".($UpperLimit - $LowerLimit)." "; }
//
@@ -510,4 +512,19 @@ function _DELETE($Table, $VARS = null)
}
}
+/***********************************************/
+
+// helpers
+
+function CheckForSpecialStrings($string)
+{
+ global $CONFIG;
+ foreach ($CONFIG['SpecialStrings'] as $term)
+ {
+ $string = str_replace($term[0],$term[1],$string);
+ }
+ $string = str_replace(" "," ",$string);
+ return $string;
+}
+
?>

0 comments on commit 04de58c

Please sign in to comment.