diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-22 17:30:20 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-22 17:30:20 +0000 |
commit | 1e2ed1bc9f8128d4d252c6761b50216d0b01998e (patch) | |
tree | a0f77cfde33df5debf9cc45a1444a8df5135f0fb /phpBB/includes/ucp/ucp_attachments.php | |
parent | 02239880a55f38828b1f4151fc2d2a658312b98e (diff) | |
download | forums-1e2ed1bc9f8128d4d252c6761b50216d0b01998e.tar forums-1e2ed1bc9f8128d4d252c6761b50216d0b01998e.tar.gz forums-1e2ed1bc9f8128d4d252c6761b50216d0b01998e.tar.bz2 forums-1e2ed1bc9f8128d4d252c6761b50216d0b01998e.tar.xz forums-1e2ed1bc9f8128d4d252c6761b50216d0b01998e.zip |
adjusting sql_freeresult a bit as well as our error handler (it now prints out if it is because of DEBUG_EXTRA being defined - which is not enabled within the betas/rc's and stable releases).
git-svn-id: file:///svn/phpbb/trunk@5699 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_attachments.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_attachments.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index d06eb08709..3c3b9c24ad 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -77,11 +77,11 @@ class ucp_attachments $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); - $sql = 'SELECT COUNT(*) as num_attachments + $sql = 'SELECT COUNT(attach_id) as num_attachments FROM ' . ATTACHMENTS_TABLE . ' WHERE poster_id = ' . $user->data['user_id']; $result = $db->sql_query_limit($sql, 1); - $num_attachments = $db->sql_fetchfield('num_attachments', 0, $result); + $num_attachments = $db->sql_fetchfield('num_attachments'); $db->sql_freeresult($result); $sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title |