DBI

From: Ene Cosmin <cosmox(at)email(dot)ro>
To: pgsql-admin(at)postgresql(dot)org
Subject: DBI
Date: 2001-03-01 09:17:06
Message-ID: 200103010917.LAA08209@zerg.codec.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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/

Responses

  • Re: DBI at 2001-03-01 10:36:55 from Anatoly K. Lasareff
  • Re: DBI at 2001-03-01 11:06:36 from Stefan Huber

Browse pgsql-admin by date

  From Date Subject
Next Message Enrico Mangano 2001-03-01 09:48:36 something more about my question about performance
Previous Message Richard Bayet 2001-03-01 05:55:05 Re: Changing the type of a column ?