raga non riesco ad utilizzare la funzione COUNT, ho questa tabella di sotto e vorrei mettere il COUNT per contare quante righe sono:
<?
require('config.php');
$lole=$_COOKIE["usNick"];
$count = "SELECT COUNT (*) FROM tb_users where referer='$lole' and refp=''";
"echo $count;"
?>
ma non mi da nessun risultato.. dove sbaglio?
Codice PHP:
<div id="tables">
<table align="center" width="80%" cellspacing="0" cellpadding="0">
<tr>
<th class="top">[b] Username[/b]</th>
<th class="top">[b] Paese[/b]</th>
<th class="top">[b] Referral da †[/b]</th>
<th class="top">[b] Ultimo Click[/b]</th>
<th class="top">[b] Click[/b]</th>
<?
require('config.php');
$lole=$_COOKIE["usNick"];
$tabla = mysql_query("SELECT * FROM tb_users where referer='$lole' and refp='' ORDER BY joindate DESC");
mysql_close($con);
while ($row = mysql_fetch_array($tabla)) {
echo "<tr><td align='left'> ";
echo $row["username"];
echo "</td><td align='left'> ";
echo $row["country"];
echo "</td><td align='left'> ";
echo date("d/m/Y H:i", $row["joindate"]);
echo "</td><td align='left'> ";
echo date("d/m/Y H:i", $row["lastlogdate"]);
echo "</td><td align='right'>";
echo $row["visits"];
echo "</td></tr>";
}
echo "</table>";
?>
</div>