$table->construct_header($lang->username); $table->construct_header($lang->total_size, array('width' => '20%', 'class' => 'align_center'));
|
$table->construct_header($lang->username); $table->construct_header($lang->total_size, array('width' => '20%', 'class' => 'align_center'));
|
$query = $db->query(" SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) GROUP BY a.uid ORDER BY totalsize DESC LIMIT 5 ");
| switch($db->type) { case "pgsql": $query = $db->query(" SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) GROUP BY ".$db->build_fields_string("attachments", "a.").",u.uid,u.username ORDER BY totalsize DESC LIMIT 5 "); break; default: $query = $db->query(" SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) GROUP BY a.uid ORDER BY totalsize DESC LIMIT 5 "); }
|