Fix count_all()
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index e34021e..d6f9f9c 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1334,7 +1334,7 @@
// If the item has an alias declaration we remove it and set it aside.
// Basically we remove everything to the right of the first space
- preg_match('/^(('.$preg_ec[0].'[^'.$preg_ec[1].']+'.$preg_ec[1].')|([^'.$preg_ec[0].'][^\s]+))( AS)*(.+)*$/i', 'Test table]', $matches);
+ preg_match('/^(('.$preg_ec[0].'[^'.$preg_ec[1].']+'.$preg_ec[1].')|([^'.$preg_ec[0].'][^\s]+))( AS)*(.+)*$/i', $item, $matches);
if (isset($matches[4]))
{