Arkadaşlar merhaba top10 player sisteminde phpde sorun yaşıyorum şöyle ki listeleme yapılıyor fakan başında 1 2 3 4 5 diye belirtmiyor onu nasıl ayarlayabilirim php kodunu atıyorum inceleyip dönserseniz memnun olurum. İyi forumlar dilerim

Isim galibiyet maglubiyet sampiyonluk ve puan bu stunlari oluştururken birde sira(id) diye olusturup bunlari php ile mysqlden cektigin gibi onuda ayni sekilde cekmen gerekiyor. Soruyumu yanlis anladim acaba ?

Zaten yapmışsın her şeyi !
Id cekiyor ama id baska birsey ben puani yuksek olanin tepeye geldiginde basina 1. Olarak belirtmesni ayarlayamadim
<?php error_reporting(0);
$mysql_adres = 'localhost'; 
$mysql_kullanici = 'root'; 
$mysql_sifre = 'bayram'; 
$mysql_db = 'test'; // 
header("Content-Type: text/html; charset=windows-1254");
$mysql_baglanti = mysql_connect($mysql_adres, $mysql_kullanici, $mysql_sifre);
if (!$mysql_baglanti){ echo "SQL Ba?lantysy sağlanamadı, lütfen site yöneticisiyle iletişime geçin."; } else { mysql_select_db($mysql_db,$mysql_baglanti);} echo "
<head>
<title>Pvp Ligi</title>
<style type=\"text/css\">
<!--
.style10 {font-size: 12px; font-weight: bold; font-style: italic; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif;}
body {background-image:url(singlemenu.png)}
.style10 {font-family: 'IM Fell DW Pica', serif; font-weight: bold; font-size: 15px; color: #A99877; }
.style12 {font-family: 'Trebuchet MS', italik,arial,helvetica; font-size: 10px; color: #078509; }
.style20 {font-family: 'Trebuchet MS', italik,arial,helvetica; font-size: 12px; color: #736F6E; }
.style30 {font-family: 'Trebuchet MS', italik,arial,helvetica; font-size: 10px; color: #CBA942; }
-->
</style>

</head>
<body>
<table width=\"200\" height=\"250\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#000000\">
<tr>
<td width=\"250\" align=\"left\" valign=\"top\"><table width=\"0%\" height=\"0\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"50%\" align=\"left\" ><span class=\"style10\">İsim</span></td>
<td width=\"16%\" align=\"left\" class=\"style10\">G</td>
<td width=\"16%\" align=\"left\" class=\"style10\">M</td>
<td width=\"16%\" align=\"left\" class=\"style10\">Ş</td>
<td width=\"16%\" align=\"left\" class=\"style10\">P</td>
</tr>
</table><hr />
",listele(),"
</td>
</tr>
</table>
</body>
</html>";

function listele(){ 
$sorgu = mysql_query("SELECT * FROM pvpligi order by puan desc limit 10");
$sira='1';
while ($row = mysql_fetch_object($sorgu)) { $isim = $row->isim; $galibiyet = $row->galibiyet; $maglubiyet = $row->maglubiyet; $sampiyonluk = $row->sampiyonluk; $oyun = $row->oyun; $puan = $row->puan;
$returnveri .= "
<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"55%\" class=\"style30\">$sira- $isim</td><td width=\"15%\" class=\"style30\">$galibiyet</td><td width=\"15%\" class=\"style30\">$maglubiyet</td><td width=\"15%\" class=\"style30\">$sampiyonluk</td><td width=\"15%\" class=\"style30\">$puan</td>
</tr>
</table>"; $sira++;} return $returnveri; } ?>

Yapmak istediğin buydu sanırım,

1- Ahmet
2- Veli

Diye gidiyor birde php dosyanda bir çok hata vardı localde düzelttim, kolay gelsin.
Bayram cok tesekkur ederim eline saglik

Üye Ol veya Giriş Yap

Bu forum başlığına mesaj atmak istiyorsanız hemen üye olun veya giriş yapın.