Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP/MySQL

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>";
        }

Name: Anonymous 2009-09-09 12:26

use perl/postgres instead.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List