0

Hy i have two tables articles and iniziale, articles have a collum c2,and iniziale have c1 i whant to do like this c1(whic its have one value only)- sum(c2)(entire collum)
ive tryied like this but nothing...:(

                 <?php

$result = mysql_query("SELECT *,SUM(iCarl)-SUM(CarrelliCC22) as total2 from articles,iniziale");  
$row= mysql_fetch_assoc($result);

echo "<h4>" . $row['total2'] . "</h4>";

?>
1
Contributor
1
Reply
13
Views
3 Years
Discussion Span
Last Post by bolfescu
0
  <?php

$result = mysql_query("SELECT *,iCarrelli-SUM(Carrelli) as total5   FROM articles,inc");  
$row= mysql_fetch_assoc($result);

echo "" . $row['total5'] . "";

?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.