<?php
$gel=$_GET['gel'];
$sql="SELECT * FROM Wallpapers where Category='$gel' ORDER BY RAND() LIMIT 5";
$sonuc=mysql_fetch_array(mysql_query($sql));
$title=$sonuc["Title"];
$wallpaper=$sonuc["Wallpaper1"];
$id=$sonuc["ID"];
$seotitle = str_replace(" ", "+", $title);
echo "
<a href=\"/$seotitle/\"> $title </a><br>";
?> Rastgele Veri Çekmede Sorun
7
●447
- 11-10-2008, 20:58:31Aşağıdaki kod'da limit 5 olmasına rağmen genede gösterimde sadece bir tane gösteriyor ?? Hata nerde acaba anlayamadım ??
- 11-10-2008, 22:28:47Aşağıdaki kodu da denedim ama aynı senin verdiğin koddaki gibi durmadan ard arda bütün listeyi sıralıyor.. Liste bitmiyor haliyle, olmadı yani

while( $sonuc=mysql_fetch_array(mysql_query($sql)) ): $title=$sonuc["Title"]; $wallpaper=$sonuc["Wallpaper1"]; $id=$sonuc["ID"]; $seotitle = str_replace(" ", "+", $title); echo " <a href=\"/$seotitle/\"> $title </a><br>"; endwhile; - 11-10-2008, 22:57:45Şunu dener misin ?
<?php $gel=$_GET['gel']; $sql="SELECT * FROM Wallpapers where Category='$gel' ORDER BY RAND() LIMIT 5"; $sonuc=mysql_query($sql); var_dump(mysql_num_rows($sonuc)); $title=$sonuc["Title"]; $wallpaper=$sonuc["Wallpaper1"]; $id=$sonuc["ID"]; $seotitle = str_replace(" ", "+", $title); echo " <a href=\"/$seotitle/\"> $title </a><br>"; ?> - 12-10-2008, 00:10:00
<?php $gel=$_GET['gel']; $sql=mysql_query("SELECT * FROM Wallpapers where Category='".$gel."' ORDER BY RAND() LIMIT 0,5"); while ($sonuc=mysql_fetch_array($sql)) { $title=$sonuc["Title"]; $wallpaper=$sonuc["Wallpaper1"]; $id=$sonuc["ID"]; $seotitle = str_replace(" ", "+", $title); echo "<a href=\"/$seotitle/\"> $title </a><br>"; } ?>Birde bunu dene bakalım.
