ASP interesse |
|
Ej ik krijg de volgende fout:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/carriere-manager.nl/www/yourteam.php on line 29
Warning : mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home /carriere -manager .nl /www /yourteam .php on line 29
Hier mijn script:
<?php
if(controllogin()){
$query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."'";
$result = mysql_query($query) or die(mysql_error());
echo _yourteams."<br>";
while($row = mysql_fetch_array($result)){
echo "<a href='?p=yourteam&team=".$row['id']."'>".$row['name']."</a><br>";
}
if(isset($_GET['team'])){
$query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."' AND id = '".$_GET['team']."'";
$result = mysql_query($query);
if(mysql_num_rows($result) == 1){
$query2 = "SELECT * FROM ".$config['prefix']."players WHERE teamid = '".$_GET['team']."'";
$result = mysql_query($query2);
if(mysql_num_rows($result2) > 0){
echo "<table><tr>
<td>"._name."</td>
<td>"._nationality."</td>
<td>"._age."</td>
<td>"._type."</td>
<td>"._speed."</td>
<td>"._uithouding."</td>
<td>"._moral."</td>
<td>"._attack."</td>
<td>"._defend."</td>
<td>"._blessure."</td>
<td>"._cards."</td>
<td>"._goals."</td>
<td>"._value."</td></tr>";
while($row2 = mysql_fetch_array($result2)){
$cards = "...";
echo "<tr>
<td>".$row2['name']."</td>
<td><img src='flags/"._nationality.".gif'></td>
<td>".$row2['age']."</td>
<td>".$row2['type']."</td>
<td>".$row2['speed']."</td>
<td>".$row2['uithouding']."</td>
<td>".$row2['attack']."</td>
<td>".$row2['defend']."</td>
<td>".$row2['blessure']."</td>
<td>".$cards."</td>
<td>".$row2['goals']."</td>
<td>".$row2['value']."</td><tr>";
}
}
else{
echo _noplayersfound;
}
}
else{
echo _hackattempt;
$query = "UPDATE ".$config['prefix']."members SET hack = hack+1 WHERE id = '".$_SESSION['perSOniD']."'";
mysql_query($query);
}
}
}
?>
<?php if(controllogin()){ $query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."'"; echo "<a href='?p=yourteam&team=".$row['id']."'>".$row['name']."</a><br>"; } if(isset($_GET['team'])){ $query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."' AND id = '".$_GET['team']."'"; $query2 = "SELECT * FROM ".$config['prefix']."players WHERE teamid = '".$_GET['team']."'"; <td>"._name."</td> <td>"._nationality."</td> <td>"._age."</td> <td>"._type."</td> <td>"._speed."</td> <td>"._uithouding."</td> <td>"._moral."</td> <td>"._attack."</td> <td>"._defend."</td> <td>"._blessure."</td> <td>"._cards."</td> <td>"._goals."</td> <td>"._value."</td></tr>"; $cards = "..."; <td>".$row2['name']."</td> <td><img src='flags/"._nationality.".gif'></td> <td>".$row2['age']."</td> <td>".$row2['type']."</td> <td>".$row2['speed']."</td> <td>".$row2['uithouding']."</td> <td>".$row2['attack']."</td> <td>".$row2['defend']."</td> <td>".$row2['blessure']."</td> <td>".$cards."</td> <td>".$row2['goals']."</td> <td>".$row2['value']."</td><tr>"; } } else{ } } else{ $query = "UPDATE ".$config['prefix']."members SET hack = hack+1 WHERE id = '".$_SESSION['perSOniD']."'"; } } } ?>
Volgens mij is hij niet fout maar er zal dan wel ergens een foutje zitten:s
|