[ticket/10146] Firebird: 1 <= precision <= 18 ==> Cast to DECIMAL(18, 0).

PHPBB3-10146
This commit is contained in:
Andreas Fischer 2011-04-22 11:01:07 +02:00
parent 32bc980ca0
commit 9cb6a69861

View file

@ -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':