Hi all!
I'm having some trouble with my select query.
Here is my code:
<?php
session_start();
include("survey.inc");
$connection=mysql_connect($host,$user,$password)
or die ("Couldn't connect to server");
$db=mysql_select_db($database,$connection)
or die ("Couldn't select database");
$result=mysql_query("Select COUNT(Q1) from HGsurvey")
or DIE ("Couldn't execute query");
$orgNoQ1=mysql_fetch_row($result);
echo $orgNoQ1;
?>
At first I got a resource ID #2, found out what that was, and tried adding the mysql_fetch_row($result) to my code.
Now, however, the query echoes the word Array instead of the number of entries in the column which is 18.
I'm sure this must be really easy, but please bear with me, as I'm still new to PHP.
Would appreciate any help I can get.
Thanks a bunch!