Received: from hood.hctc.com (IDENT:root@hood.hctc.com [208.25.168.1]) by hub.org (8.9.2/8.9.1) with ESMTP id TAA01344 for ; Mon, 8 Feb 1999 19:52:56 -0500 (EST) (envelope-from jeffers@hctc.com) Received: from hctc.com (hccs45.hctc.com [208.25.168.45]) by hood.hctc.com (8.8.8/8.8.7) with ESMTP id QAA00447 for ; Mon, 8 Feb 1999 16:50:32 -0800 Message-ID: <36BF851F.4CA449BD@hctc.com> Date: Mon, 08 Feb 1999 16:45:19 -0800 From: jeff X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: pgsql-interfaces@hub.org Subject: ack... problems with Pg, please advise. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hello, i just installed postgreSQL and it works great, i imported my db and it works great with the psql interface, and i even can access it from the shell with a perl script. but when i cut and paste the code into a cgi, it returns nulls (albiet the appropriate number of nulls). here is my code, what am i doing wrong? thanks. unless ($a) {$a="Metallica";} $conn = Pg::connectdb("dbname=tempest"); (PGRES_CONNECTION_OK eq $conn->status ) and print "Pg::connectdb ........... ok
" or die "Pg::connectdb ........... not ok: ", $conn->errorMessage; # this part works, as the "ok" message is shown on the page... $result = $conn->exec("SELECT title from cds where artist='$a'"); while ( @row=$result->fetchrow ) { print "@row"; print "
\n"; } it returns the correct number of
s, but prints nothing, @rows appear to be null. any ideas?