Hi,
<?
include ("../config.php");
mysql_select_db($dbname);
$sql = "SELECT field1, count(*) AS cnt FROM phplog GROUP BY field1 LIMIT 0, 30";
$res3 = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($res3) > 0) {
while($row=mysql_fetch_array($res3)) {
echo $field1;
echo $cnt;
echo "<br>";
}
}
else {
echo "No records found <br>";
}
?>
If i do this query within MYSQL i see data, I have no idea why i cant see it using this.
It returns nothing.. this seems so simple yet i cannot for the life of me see the error, can someone see my simple error?