Hello,
You could use the following.
// Connect to DB
$connect = mysql_connect($dbhost, $dbuser, $dbpass);
// Change to the proper DB. Not really needed
// But we use it to make sure.
mysql_select_db($db) or die("Unable to select $db");
// get the info in the database.
$query = mysql_query("SELECT * FROM requests") or die("Cant find in database");
// Make sure we did get them
if ($query) {
// Set total to zero
$total = 0;
// loop through the database
while ($row = mysql_fetch_array($query)) {
// Extract the totals for each and add them to the total.
$total = $total + $row["prowname"];
}
// Print out the total
echo $total;
}else{
// do something else here
}
Hope this helps.
Regards,
Ray