PHP mysql_query not working right :/

Discussion in 'PHP' started by Waizujin, Jun 10, 2008.

  1. #1
    I FIGURED IT OUT, SO SORRY!

    I have this query:

    
    mysql_query("SELECT Ip_2 FROM " .$_SESSION['Server']. "_Users WHERE Ip_2 = '$_SESSION[ip]'") or die(mysql_error());
    
    Code (markup):
    And I am getting this error: Table 'eternal_war.server1_users' doesn't exist

    $_SESSION['Server'] contains server1, not eternal_war.server1.
    Why would it be doing this? eternal war is the database name though.

    Any ideas?

    -Ryu
     
    Waizujin, Jun 10, 2008 IP
  2. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    selling vcc, Jun 10, 2008 IP
  3. softvision

    softvision Peon

    Messages:
    146
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Check your code where you assigned value to session variable.
     
    softvision, Jun 11, 2008 IP