hi I am having trouble on echoing a sum from a table,
The mysqul works and give me the wantted result and looks like
SELECT sum(brick) FROM `goodship`
this is the code i am trying to get to show it on the site,
<html>
<head>
<?php
$con=mysqli_connect("hostwiththemost.com","bulderbob","superscreatpassword","shipstable");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
</head>
<body>
<?php
$result = mysql_query($con"SELECT SUM(brick) FROM goodship");
while($row=mysql_fetch_array($result))
{
echo $row['SUM(brick)'] ;
}
?>
</body>
</html>
any see why this is not working ?
thanks.