Greetings!!!
I have a problem that I haven't discover the solution and I need a help of you!...
I have a DB table with a quantity field that I update frequently. The table have some registers and I want to see the sum of that quantities of them.
My situation in this moment:
PHP Code:
In this case appears a number of phrases as the number of registers that I have update.PHP Code:<?
$sql = "select * from cart where session = '$sid'";
$query = query($sql);
$conta = mysql_num_rows($query);
for ($i=0;$i<$conta;$i++)
{
$arrw = mysql_fetch_array($query);
?>
<td align="right"><h2><a href="carrinho.php" target="_blank">Carrinho</a> - tem <em><? if($arrw["quant"]) echo $arrw["quant"]; else echo "0"; ?></em> produtos</h2></td>
<? } ?>
Any sugestion??



Reply With Quote
Bookmarks