I have this sqlqry, icarrelli have the value 0 and the q2 value 64(sum) why the result is 64 and not -64?


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

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


Without seeing your data, this is impossible to answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.