Good,
I have a question regarding the number of records in a given table.
SELECT COUNT Nome FROM 'tb_utilizador'
I want to display the number of records in a table in php.
<?php
include("Config.php");
$sql = mysql_query("Select * From tb_utilizador");
mysql_query($sql) or die(mysql_error());
if($linhas == 0){
echo "Nada encontrado";
exit();
}
else{
while($row = mysql_fetch_array($sql)){
$ID = $row["id"];
if($linhas %2 == 0){
$cor = "#F0F0F0";
}
else{
$cor = "#E2EFFE";
}
echo "
<tr bgcolor=\"$cor\">
<td> $id</td>
</tr>";
}
}
?>