Okay, Apache has recently been upgraded on my server. The following code, which was previously working fine $sql = "SELECT ug.user_id, g.group_id as g_id, u.user_posts, g.group_count, g.group_count_max FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u LEFT JOIN ". USER_GROUP_TABLE." ug ON g.group_id=ug.group_id AND ug.user_id=$user_id WHERE u.user_id=$user_id AND g.group_single_user=0 AND g.group_count_enable=1 AND g.group_moderator<>$user_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error geting users post stat', '', __LINE__, __FILE__, $sql); } PHP: is now giving this error: The "ON g.group_id " is the part giving the error. I assume that it no longer likes the syntax there.
The error is not Apache related, rather it's MySQL related. Simply put the error is saying there is no field called group_id in the table called phpbb_groups , It's possible your database got corupted if you didn't change phpBB versions. Apache upgrade wouldn't do that just from a single upgrade, so the problem lies elsewhere.
No, the field is still there. I checked that because that's what my first thought was. The Apache upgrade was part of a general upgrade of PHP, cPanel etc.