From 9cb6a69861b2ef1ca9a23ffe773ca3be4f9e4461 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 22 Apr 2011 11:01:07 +0200 Subject: [ticket/10146] Firebird: 1 <= precision <= 18 ==> Cast to DECIMAL(18, 0). PHPBB3-10146 --- phpBB/includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 585e23b2ee..ca5a483536 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -175,7 +175,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false) switch ($db->sql_layer) { case 'firebird': - $sql_update = 'CAST(CAST(config_value as DECIMAL(255, 0)) + ' . (int) $increment . ' as VARCHAR(255))'; + // Precision must be from 1 to 18 + $sql_update = 'CAST(CAST(config_value as DECIMAL(18, 0)) + ' . (int) $increment . ' as VARCHAR(255))'; break; case 'postgres': -- cgit v1.2.1