From 6cca907ecfa21f0396aee842d9950203e4b9a5c0 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 3 Apr 2010 10:54:35 +1300 Subject: [PATCH] Pretend exponents are simple text since hex strings can also be. --- inc/AwlDBDialect.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/AwlDBDialect.php b/inc/AwlDBDialect.php index e5027923..04ca376e 100644 --- a/inc/AwlDBDialect.php +++ b/inc/AwlDBDialect.php @@ -194,6 +194,8 @@ class AwlDBDialect { elseif ( is_numeric($value)) { if ( preg_match('{^(19|20)\d\d(0[1-9]|1[012])([012]\d|30|31)$}', $value) ) $value_type = PDO::PARAM_STR; // YYYYMMDD + elseif ( preg_match('{^[0-9+-]+e[0-9+-]+$}i', $value) ) + $value_type = PDO::PARAM_STR; // 72e57650 could easily be a string else $value_type = PDO::PARAM_INT; }