Hello guys I am pretty new to PHP/MYSQL. what I want to do is select all of the price data from the table and display them as a total number.
With the above code I am only getting the price from the first row, I want all of the price fro all of the rows added together. is this possible?
PHP Code:
<?php
$query2 = "SELECT * ";
$query2 .="FROM lead_partners_pages ";
$query2 .="WHERE partnerid = '$partnerid'";
$result_set2 = mysql_query($query2);
$row2 = mysql_fetch_array($result_set2);
?>
<div class="FRight totalprice">
<?php echo "$".$row2["price"]?>
</div>
With the above code I am only getting the price from the first row, I want all of the price fro all of the rows added together. is this possible?
Comment