Im reletively new with mysql and am having some issues with trying to retrieve a value out of my database. It's just a poll total that will increment when submitted. On the page with the poll, Im trying to display the total that is in the database and I can't seem to pull it up. Some please help.
if (!$db)
{
echo "Cannot connect to database!";
}
if ($db)
{
echo "Connected to database";
}
mysql_select_db("sometable_adrenaline-magazine_com");
$query = "Select sum(shirts) From somedatabase";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
print ("<br><b>Number of shirts in Database: $row </b>");
}
?>
Why is this printing the word ARRAY and not the value?!?!