problem with SUM and Postgres

From: Date: Wed, 09 Oct 2002 23:29:00 +0000
Subject: problem with SUM and Postgres
Groups: php.general 
Request: Send a blank email to php-general+get-119476@lists.php.net to get a copy of this message
I can't figure out why the following code is not returning a column total: $sql1 = "SELECT SUM(hostingcost) FROM $tablename WHERE webserver = '$webserver'"; $hosting = pg_exec($connect, $sql1); echo $hosting; This returns: Resource ID #3 The only thing I can think of is that the hostingcost column's default value is set to MONEY which is a postgres specific constraint. The query works fine within psql on the server, but not with php. Thanks for any help.

« previous php.general (#119476) next »