diff --git a/db.class.php b/db.class.php index 581df1f..f9c22c1 100644 --- a/db.class.php +++ b/db.class.php @@ -270,13 +270,10 @@ class DB while (($pos = strpos($sql, $type, $lastPos)) !== false) { $lastPos = $pos + 1; if (isset($posList[$pos]) && strlen($posList[$pos]) > strlen($type)) continue; - if (substr($sql, $pos - 1, 1) == '%') continue; $posList[$pos] = $type; } } - $sql = str_replace('%%', '%', $sql); - ksort($posList); foreach ($posList as $pos => $type) { diff --git a/simpletest/BasicTest.php b/simpletest/BasicTest.php index 64b98b6..93abb3d 100644 --- a/simpletest/BasicTest.php +++ b/simpletest/BasicTest.php @@ -23,11 +23,6 @@ class BasicTest extends SimpleTest { DB::useDB('libdb_test'); } - function test_0_5_date_format() { - $month = DB::queryFirstField("SELECT DATE_FORMAT(NOW(), '%%b')", 4); - $this->assert($month === date('M')); - } - function test_1_create_table() { DB::query("CREATE TABLE `accounts` (