Name: Anonymous 2009-09-09 12:15
Hi guys, I hope someone can help me out here.
I'm trying to count how many records there are in my "voc" table where the "kan" cell is not empty.
When I execute my code I get "Query was empty"
$sql = "SELECT COUNT(nl) FROM voc WHERE kan IS NOT NULL";
$result = mysql_query($query) or die(mysql_error());
while($obj = mysql_fetch_object($result)) {
echo "<h1>" . $obj['COUNT(nl)'] ."</h1>";
}
I'm trying to count how many records there are in my "voc" table where the "kan" cell is not empty.
When I execute my code I get "Query was empty"
$sql = "SELECT COUNT(nl) FROM voc WHERE kan IS NOT NULL";
$result = mysql_query($query) or die(mysql_error());
while($obj = mysql_fetch_object($result)) {
echo "<h1>" . $obj['COUNT(nl)'] ."</h1>";
}