Ben adlarının bir dizi döngü çalışıyor ve her kullanıcı için, her bir mysql_query yürütmek duyuyorum.
<?php
for ($i = 0; $i < count($u); $i++)
{
$j = $i + 1;
$s = $database->checkUserPlayedRecent($u);
if (mysql_num_rows($s) > 0)
{
?>
<tr>
<?php
echo "<td>$j</td>";
?>
<?php
echo "<td>$u[$i]</td>";
?>
<?php
echo "<td>$p[$i]</td>";
?>
</tr>
<?
}
}
?>
As you can see, $u is each username. I want each username to only appear in the echo statements if each one has num_rows > 0.
At the moment nothing is displaying. But there should be results being returned!
Birisi lütfen yardımcı olabilir.
The sql:
$q = "SELECT id FROM ".TBL_CONF_RESULTS." WHERE (home_user = '$u' OR away_user = '$u') AND date_submitted >= DATE_SUB(CURDATE(),INTERVAL 14 DAY)";