pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ene Cosmin <cosmox@email.ro>
To: pgsql-admin@postgresql.org
Subject: DBI
Date: Thu, 1 Mar 2001 11:17:06 +0200
Message-ID: <200103010917.LAA08209@zerg.codec.ro> (raw)




 Hi. I need to know if I configure my psql with perl library I also need
the DBI::Pg class for quering my database in psql?. The following example
will work?

------
use DBI;

$dbh = new DBI( 'dbi:Pg:database;host', 'user', 'secret' );
if( ! $dbh->dbh ){
  echo "Could not connect to the database.<br>\n";
  exit( );
}

$sth = $dbh->prepare( 'SELECT COUNT(*) FROM some_table' );

and sow on...

------

What else do I need to install for quering a database in this way?

I did not installed yet Psql to know if will works.
Sorry, but my english it's not so god.
Cosmin.

______________________________________________________________________
Do you want a free e-mail for life ? Get it at http://www.email.ro/





______________________________________________________________________
Do you want a free e-mail for life ? Get it at http://www.email.ro/




view thread (4+ messages)  latest in thread

Message-ID: <200103010917.LAA08209@zerg.codec.ro>
Permalink:  ../200103010917.LAA08209@zerg.codec.ro/
Also on:    postgresql.org/message-id/200103010917.LAA08209@zerg.codec.ro

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cosmox@email.ro
  Subject: Re: DBI
  In-Reply-To: <200103010917.LAA08209@zerg.codec.ro>
  References: <200103010917.LAA08209@zerg.codec.ro>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox