Received: from zerg.codec.ro (Zerg.CODEC.Ro [193.230.240.30]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f219D7x15346 for ; Thu, 1 Mar 2001 04:13:10 -0500 (EST) (envelope-from cosmox@email.ro) Received: (from httpd@localhost) by zerg.codec.ro (8.9.3/8.9.2) id LAA08209; Thu, 1 Mar 2001 11:17:06 +0200 Message-Id: <200103010917.LAA08209@zerg.codec.ro> From: Ene Cosmin To: pgsql-admin@postgresql.org Subject: DBI Date: Thu, 1 Mar 2001 11:17:06 +0200 MIME-Version: 1.0 X-Originating-IP: [10.13.11.3, 193.231.148.9] X-Mailer: freemail 0.9.8 X-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) X-Organization: CODEC FreeMail X-Archive-Number: 200103/3 X-Sequence-Number: 847 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.
\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/