G
G
Gugerna2015-12-16 21:30:34
PHP
Gugerna, 2015-12-16 21:30:34

How to calculate an order?

There is a table in Mysql where the quantity of goods and its price are indicated, how to display the final number that will add up all the numbers of the number * price?

$result = mysql_query("SELECT * FROM zakaz WHERE idcom = $idco",$db);
$myrow = mysql_fetch_array($result);
$pr = 0;
do
{

  while($myrow = mysql_fetch_array($result));

There is a cycle, but how to display the final result?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rikcon, 2015-12-16
@Gugerna

dev.mysql.com/doc/refman/5.7/en/mathematical-funct...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question