login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Mysql fout

Offline tomk - 22/12/2005 15:07
Avatar van tomkASP interesse Ej ik krijg de volgende fout:

  1. 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:
  1. <?php
  2.  
  3. if(controllogin()){
  4.  
  5. $query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."'";
  6.  
  7. $result = mysql_query($query) or die(mysql_error());
  8.  
  9. echo _yourteams."<br>";
  10.  
  11. while($row = mysql_fetch_array($result)){
  12.  
  13. echo "<a href='?p=yourteam&team=".$row['id']."'>".$row['name']."</a><br>";
  14.  
  15. }
  16.  
  17. if(isset($_GET['team'])){
  18.  
  19. $query = "SELECT * FROM ".$config['prefix']."teams WHERE personid = '".$_SESSION['perSOniD']."' AND id = '".$_GET['team']."'";
  20.  
  21. $result = mysql_query($query);
  22.  
  23. if(mysql_num_rows($result) == 1){
  24.  
  25. $query2 = "SELECT * FROM ".$config['prefix']."players WHERE teamid = '".$_GET['team']."'";
  26.  
  27. $result = mysql_query($query2);
  28.  
  29. if(mysql_num_rows($result2) > 0){
  30.  
  31. echo "<table><tr>
  32.  
  33. <td>"._name."</td>
  34.  
  35. <td>"._nationality."</td>
  36.  
  37. <td>"._age."</td>
  38.  
  39. <td>"._type."</td>
  40.  
  41. <td>"._speed."</td>
  42.  
  43. <td>"._uithouding."</td>
  44.  
  45. <td>"._moral."</td>
  46.  
  47. <td>"._attack."</td>
  48.  
  49. <td>"._defend."</td>
  50.  
  51. <td>"._blessure."</td>
  52.  
  53. <td>"._cards."</td>
  54.  
  55. <td>"._goals."</td>
  56.  
  57. <td>"._value."</td></tr>";
  58.  
  59. while($row2 = mysql_fetch_array($result2)){
  60.  
  61. $cards = "...";
  62.  
  63. echo "<tr>
  64.  
  65. <td>".$row2['name']."</td>
  66.  
  67. <td><img src='flags/"._nationality.".gif'></td>
  68.  
  69. <td>".$row2['age']."</td>
  70.  
  71. <td>".$row2['type']."</td>
  72.  
  73. <td>".$row2['speed']."</td>
  74.  
  75. <td>".$row2['uithouding']."</td>
  76.  
  77. <td>".$row2['attack']."</td>
  78.  
  79. <td>".$row2['defend']."</td>
  80.  
  81. <td>".$row2['blessure']."</td>
  82.  
  83. <td>".$cards."</td>
  84.  
  85. <td>".$row2['goals']."</td>
  86.  
  87. <td>".$row2['value']."</td><tr>";
  88.  
  89. }
  90.  
  91. }
  92.  
  93. else{
  94.  
  95. echo _noplayersfound;
  96.  
  97. }
  98.  
  99. }
  100.  
  101. else{
  102.  
  103. echo _hackattempt;
  104.  
  105. $query = "UPDATE ".$config['prefix']."members SET hack = hack+1 WHERE id = '".$_SESSION['perSOniD']."'";
  106.  
  107. mysql_query($query);
  108.  
  109. }
  110.  
  111. }
  112.  
  113. }
  114.  
  115. ?>


Volgens mij is hij niet fout maar er zal dan wel ergens een foutje zitten:s

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2025 Sitemasters.be - Regels - Laadtijd: 0.207s