• 26-12-2009, 16:32:30
    #1
    merhaba, normal site içi aramada herhangibir sorun olmayan sitemde googleden gelen aramalarda aşağıdaki hatayı alıyorum

    Hata
    Alıntı
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/oyunforu/public_html/includes/search.php on line 22
    Hatayı veren kodlar

    $result2 = mysql_query("SELECT * FROM files order by rand() desc limit 25");
        
            $fileinrow="1";
        while($row = mysql_fetch_array($result2)) {
            $fileid = $row['fileid'];
            $filetitle = $row['title'];
            $filedescription = $row['description']." oyunları, ".$row['description']." flash oyunları, ".$row['description']." kral oyun, ".$row['description']." oyunlar oyna,";
            $fileicon = $row['icon'];
            $iconlocation = $row['iconlocation'];
            $timesplayed = number_format($row['timesplayed']);
            
            if ($iconlocation == '1') {
                $imageurl = $siteurl."/files/image/".$fileicon;
            } else {
                $imageurl = $fileicon;
            }
            
            if (strlen($filedescription) > '40') {
                $filedescription = substr("$filedescription",0,37)."...";
            }
            
            if ($fileinrow == '1') {
             echo "<tr>";   
            }
            $fileinrow="1";
       22SATIR BURASI while($row = mysql_fetch_array($result2)) {
            $fileid = $row['fileid'];
            $filetitle = $row['title'];
            $filedescription = $row['description']." oyna, ".$row['description']." flash oyunları, ".$row['description']." kral oyun, ".$row['description']."  oyna,";
            $fileicon = $row['icon'];
            $iconlocation = $row['iconlocation'];
            $timesplayed = number_format($row['timesplayed']);
            
            if ($iconlocation == '1') {
                $imageurl = $siteurl."/files/image/".$fileicon;
            } else {
                $imageurl = $fileicon;
            }
            
            if (strlen($filedescription) > '40') {
                $filedescription = substr("$filedescription",0,37)."...";
            }
            
            if ($fileinrow == '1') {
             echo "<tr>";   
            }
        ?>
    Yardım eden herkese şimdiden teşekkürler.
  • 26-12-2009, 17:20:22
    #2
    22. satırın üstüne şunu yazarak tekrar deneyebilir misin.

    $result2 = mysql_query("SELECT * FROM files order by rand() desc limit 25");

    denemedim ama aceba mysql_fetch_array($result2) "result2" değişkeninin tamamen boşaltıyor olabilir mi ama öyle olsa hiç döngüye girmezdi zaten yine de bi dene istersen..
  • 26-12-2009, 17:43:23
    #3
    sorun cözüldü ilgi gösteren herkese teşekkürler, sunucunun overload olması bu hataya sebeb olmuş