Bu ben daha önce rastlamadım sadece bir şey olduğunu düşünüyorum!
$r = $database->currentChallengers($f, $g);
while($row=mysql_fetch_assoc($r))
{
$ U [] = $ row ['username'];
$i[]=$row['userid'];
$s[]=$row['streak'];
}
for ($i = 0; $i < count($u); $i++)
{
foreach ($u as $user)
{
echo "Challenger: $u[$i]";
}
}
Yani PHP aşağıdaki veritabanı sorgu için:
function currentChallengers($f, $g)
{
$q = "SELECT k.userid, k.streak, u.username
FROM ".TBL_KOTH." k
INNER JOIN ".TBL_USERS." u
ON k.userid = u.id
WHERE k.format = '$f' && k.game = '$g' && k.king = '0' && k.done = '0'
ORDER BY k.userid";
return mysql_query($q, $this->connection);
}
Ben hata alıyorum
Ölümcül hata: [] operatörü dizeleri için desteklenmiyor
On line
$ U [] = $ row ['username'];
Could anyone tell me why this is happening? Also, should the code I have written list each username from the query? Thanks