Error after upgrading Apace

Discussion in 'PHP' started by egdcltd, Aug 16, 2009.

  1. #1
    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.
     
    egdcltd, Aug 16, 2009 IP
  2. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    kblessinggr, Aug 16, 2009 IP
  3. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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.
     
    egdcltd, Aug 16, 2009 IP
  4. arcode

    arcode Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    could you show the current database scheme seems some field missing there.
     
    arcode, Aug 16, 2009 IP