Changeset 6321


Ignore:
Timestamp:
May 24, 2010, 1:12:23 PM (10 years ago)
Author:
plg
Message:

bug 1682: r6312 was producing a MySQL error (depending on the MySQL server
version) because a count() implies a group by.

This code change was checked against MySQL 5.0.75, MySQL 5.0.51 (where the
error occured) and SQLite 3.6.22.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/functions_user.inc.php

    r6312 r6321  
    302302    LEFT JOIN '.THEMES_TABLE.' AS t ON t.id = ui.theme
    303303  WHERE ui.user_id = \''.$user_id.'\'
     304  GROUP BY ui.user_id
    304305;';
    305306  $result = pwg_query($query);
    306307  $user_infos_row = pwg_db_fetch_assoc($result);
    307   if (0 == $user_infos_row['counter']) {
     308  if (!isset($user_infos_row['counter']) or 0 == $user_infos_row['counter']) {
    308309    create_user_infos($user_id);
    309310   
Note: See TracChangeset for help on using the changeset viewer.