From 293b156cb7439952248a2bf8e873b12aabfa1fa3 Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Thu, 7 May 2009 04:55:09 +0000 Subject: [PATCH] BUGFIX: regex fixed --- code/MSSQLDatabase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index d85ca16..d49480f 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -121,6 +121,8 @@ class MSSQLDatabase extends Database { //echo 'sql: ' . $sql . '
'; //Debug::backtrace(); + //$this->lastQueryRun=$sql; + $handle = mssql_query($sql, $this->dbConn); if(isset($_REQUEST['showqueries'])) { @@ -350,7 +352,7 @@ class MSSQLDatabase extends Database { // TODO: this returns an empty array for the following string: int(11) not null auto_increment // on second thoughts, why is an auto_increment field being passed through? - $pattern = '/^([\w()]+)\s?((?:not\s)?null)?\s?(default\s[\w\']+)?\s?(check\s[\w()\'",\s]+)?$/i'; + $pattern = '/^([\w()]+)\s?((?:not\s)?null)?\s?(default\s[\w\']+)?\s?(check\s?[\w()\'",\s]+)?$/i'; preg_match($pattern, $colSpec, $matches); //if($matches[1]=='serial8')