mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/17475] Fix MSSQL arithmetic overflow error on counting attachments size
PHPBB-17475
This commit is contained in:
@@ -182,7 +182,7 @@ class acp_main
|
||||
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
Reference in New Issue
Block a user