From 9df5ec9d1f25c33463fd36b06b62f02bda7d6557 Mon Sep 17 00:00:00 2001 From: PetrP Date: Wed, 30 Jun 2010 11:48:22 +0200 Subject: [PATCH] Mysql & Mysqli drivers: fixed bug in detection unsigned columns --- dibi/drivers/mysql.php | 2 +- dibi/drivers/mysqli.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dibi/drivers/mysql.php b/dibi/drivers/mysql.php index aabfa4fea..7c991b84f 100644 --- a/dibi/drivers/mysql.php +++ b/dibi/drivers/mysql.php @@ -466,7 +466,7 @@ public function getColumns($table) 'table' => $table, 'nativetype' => strtoupper($type[0]), 'size' => isset($type[1]) ? (int) $type[1] : NULL, - 'unsigned' => (bool) strstr('unsigned', $row['Type']), + 'unsigned' => (bool) strstr($row['Type'], 'unsigned'), 'nullable' => $row['Null'] === 'YES', 'default' => $row['Default'], 'autoincrement' => $row['Extra'] === 'auto_increment', diff --git a/dibi/drivers/mysqli.php b/dibi/drivers/mysqli.php index 67e215da7..f5a2d67d5 100644 --- a/dibi/drivers/mysqli.php +++ b/dibi/drivers/mysqli.php @@ -469,7 +469,7 @@ public function getColumns($table) 'table' => $table, 'nativetype' => strtoupper($type[0]), 'size' => isset($type[1]) ? (int) $type[1] : NULL, - 'unsigned' => (bool) strstr('unsigned', $row['Type']), + 'unsigned' => (bool) strstr($row['Type'], 'unsigned'), 'nullable' => $row['Null'] === 'YES', 'default' => $row['Default'], 'autoincrement' => $row['Extra'] === 'auto_increment',