ack... problems with Pg, please advise.

Поиск
Список
Период
Сортировка
От jeff
Тема ack... problems with Pg, please advise.
Дата
Msg-id 36BF851F.4CA449BD@hctc.com
обсуждение исходный текст
Список pgsql-interfaces
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.

<begin code snippet>

unless ($a) {$a="Metallica";}

$conn = Pg::connectdb("dbname=tempest");
(PGRES_CONNECTION_OK eq $conn->status )
    and print "Pg::connectdb ........... ok<br>"
    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 "<br>\n";
                  }
<end code snippet>

    it returns the correct number of <br>s, but prints nothing, @rows
appear to be null. any ideas?

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: John Mihailos
Дата:
Сообщение: greek support under pgaccess
Следующее
От: "Adam Williams"
Дата:
Сообщение: Re: [INTERFACES] Rapid web based apps?