mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
Merge branch 'ticket/p/10016' into develop-olympus
* ticket/p/10016: [ticket/10016] Add comment for text casting (for PostgreSQL 7.x) [ticket/10016] Leave Firebird unchanged. [ticket/10016] Fixed varchar to decimal cast on postgresql 7.x.
This commit is contained in:
commit
33c38b37d8
1 changed files with 5 additions and 1 deletions
|
@ -175,10 +175,14 @@ function set_config_count($config_name, $increment, $is_dynamic = false)
|
|||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'firebird':
|
||||
case 'postgres':
|
||||
$sql_update = 'CAST(CAST(config_value as DECIMAL(255, 0)) + ' . (int) $increment . ' as VARCHAR(255))';
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
// Need to cast to text first for PostgreSQL 7.x
|
||||
$sql_update = 'CAST(CAST(config_value::text as DECIMAL(255, 0)) + ' . (int) $increment . ' as VARCHAR(255))';
|
||||
break;
|
||||
|
||||
// MySQL, SQlite, mssql, mssql_odbc, oracle
|
||||
default:
|
||||
$sql_update = 'config_value + ' . (int) $increment;
|
||||
|
|
Loading…
Add table
Reference in a new issue