Hello,
How do I get the sum of a column in a postgresql database with PHP?
I have tried the following but it does nt work:
$resa= "SELECT sum (cost) AS bajen FROM clicks";
$res = pg_aggregate( $conn, $resa ) or die (Fel);
$total=pg_result($res,0,0);
echo "$total - $total[1]";