Forum Moderators: coopster
It sounds like a simple task but I'm having great difficulty accomplishing it.
$qty = "SELECT quantity FROM shopping WHERE product=('product1'or'product2')and session='$session'";
$qty2=mysql_query($qty) or die(mysql_error());
while($qty3=mysql_fetch_array($qty2))
{
echo $qty3;
}
If there are 2 of 'product1' and 1 of 'product2' it returns 21, how do I add them together to get 3?