Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [PostgreSQL]Failure in portal.php [C-Michael83]
#1
In the portal.php is a failure at line 200, where the unread messages are counted.
The SQL-statement trys to sum every field, which is incorrect, because you can only sum one field.
And the command IF does not exists, but the statement CASE WHEN ... THEN ... ELSE ... END (case, when, ...)

So the correct statement should be like
$query = $db->simple_select("privatemessages", "COUNT(*) AS pms_unread", "uid='".$mybb->user['uid']."' AND CASE WHEN status = '0' AND folder = '0' THEN TRUE ELSE FALSE END");
#2
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group


Forum Jump:


Users browsing this thread: 1 Guest(s)