title: Updating MYSQL Database fail, why?
body: <pre><code>$serverid = mysql_query("SELECT * FROM serveripank");
  while($row = mysql_fetch_array($serverid)) {
    require_once('../getdata/cs-getdata.php');
    $result = $cstrike-&gt;getData();
    $SNAME = $result['cstrike']['ServerVars']['servername']; //Server name
    $SMAP = $result['cstrike']['ServerVars']['mapname']; //Map name
    $SCP = $result['cstrike']['ServerVars']['currentplayers']; //Server Current Players
    $SMP = $result['cstrike']['ServerVars']['maxplayers']; //Server Max Players
    // Servers name MAX 25 letters &amp; Map
    $SNAME = substr($SNAME, 0, 25);
    $SMAP = substr($SMAP, 0, 20);
  
    $id = $row['id'];
    mysql_query("UPDATE serveripank SET players = '$SCP' WHERE id = '$id'");
    mysql_query("UPDATE serveripank SET maxplayers = '$SMP' WHERE id = '$id'");
    mysql_query("UPDATE serveripank SET map = '$SMAP' WHERE id = '$id'");
    mysql_query("UPDATE serveripank SET srname = '$SNAME' WHERE id = '$id'");
  }
  </code></pre>
  
  <p>Im using this script <a href="http://dev.ush-network.de/2010/02/02/gathering-counter-strike-data-using-php-sockets/comment-page-1/#comment-22" rel="nofollow">http://dev.ush-network.de/2010/02/02/gathering-counter-strike-data-using-php-sockets/comment-page-1/#comment-22</a> in <code>require_once('../getdata/cs-getdata.php');</code></p>
  
  <p>When i go to the link to update my MYSQL database, it doesnt display any errors but in database the rows are empty.</p>
  
  <p>This is in my cs-getdata.php file @ the bottom, so it could update all the servers with the right values... ( Dont know how to explain better )</p>
  
  <p><code>list($ip, $port) = explode(":", "row['ip']");
  $cstrike = new cstrike_statistics();
  $cstrike-&gt;setHostname('$ip');
  $cstrike-&gt;setPort($port);</code></p>
  
  <p>My problem is that it doesnt get the server info / and it puts empty values to the database.</p>