From rmello@cc.usu.edu Fri Apr 20 16:48:54 2001 Received: from fslc.ser.usu.edu (fslc.ser.usu.edu [129.123.28.122]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3KGms314948 for ; Fri, 20 Apr 2001 12:48:54 -0400 (EDT) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.ser.usu.edu (8.12.0.Beta5/8.12.0.Beta5/Debian 8.12.0-1) id f3KGmrgQ020380 for pgsql-php@postgresql.org; Fri, 20 Apr 2001 10:48:53 -0600 Date: Fri, 20 Apr 2001 10:48:53 -0600 From: Roberto Mello To: pgsql-php@postgresql.org Subject: PEAR and PG Message-ID: <20010420104853.A20297@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i X-Archive-Number: 200104/21 X-Sequence-Number: 274 Hi there, Is anyone here using PEAR with PG? I am having trouble finding decent documentation about it. I have phpdoc.de/pear but the docs there are sketchy at best. For example: private object a &query( $query ) Send a query to PostgreSQL and return the results as a DB_result object. private int numRows( $result ) Get the number of rows in a result set But if I do (I am a PHP newbie, so bear with me please, and this is just testing code): $sth = $dbh->query("select user_id from users where email='xxxxxx'"); if($dbh->numrows($sth) > 0) { $row = $sth->fetchrow(DB_FETCHMODE_ASSOC); print "more than 0 rows. Row is ". $row[0]; } else { print "no rows for you"; } Then it tells me $sth is not a PostgreSQL result set. If it isn't, how do I get it? Thanks, -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Developer (D)inner not ready: (A)bort (R)etry (P)izza From bmatzelle@yahoo.com Fri Apr 20 20:22:20 2001 Received: from web13005.mail.yahoo.com (web13005.mail.yahoo.com [216.136.174.15]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3KKMK376542 for ; Fri, 20 Apr 2001 16:22:20 -0400 (EDT) (envelope-from bmatzelle@yahoo.com) Message-ID: <20010420202218.59183.qmail@web13005.mail.yahoo.com> Received: from [146.145.232.35] by web13005.mail.yahoo.com; Fri, 20 Apr 2001 13:22:18 PDT Date: Fri, 20 Apr 2001 13:22:18 -0700 (PDT) From: "Brent R. Matzelle" Subject: Re: PEAR and PG To: pgsql-php@postgresql.org In-Reply-To: <20010420104853.A20297@cc.usu.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1540383426-987798138=:58951" X-Archive-Number: 200104/22 X-Sequence-Number: 275 --0-1540383426-987798138=:58951 Content-Type: text/plain; charset=us-ascii --- Roberto Mello wrote:> Hi there,> > Is anyone here using PEAR with PG? I am having trouble> finding decent> documentation about it.Have you seen this one? It seems rather well done.http://vulcanonet.com/soft/?pack=pear_tutBrent --------------------------------- Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices --0-1540383426-987798138=:58951 Content-Type: text/html; charset=us-ascii --- Roberto Mello wrote: > Hi there, > > Is anyone here using PEAR with PG? I am having trouble > finding decent > documentation about it. Have you seen this one? It seems rather well done. http://vulcanonet.com/soft/?pack=pear_tut Brent



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices --0-1540383426-987798138=:58951--