pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: robert_hiltibidal_at_cms08405@ccmailgw.state.il.us
To: joden@lee.k12.nc.us
To: pgsql-interfaces@postgresql.org
Subject: Re[2]: [INTERFACES] Perl Interface
Date: Tue, 22 Jun 99 13:44:48 -0600
Message-ID: <9906229300.AA930077109@ccmailgw.state.il.us> (raw)


     Afternoon,
     
     intriguing... however, how do I go to the next row? I tried a 
     variation earlier that looked like:
     
     while (@row = $result->fetchrow) {
           $string = join("\|",@row);
     }
     $result = $conn->getResult;
     
     
     I've also tried :
     
     while ($result = $conn->getResult) {
           while (@row = $result->fetchrow) {
                  $string = join("\|",@row);
           }
           push(@set,$string);
     }
     
     
     The goal is to get multiple rows into a single array. The answer is 
     probally very simple. 
     
     
     Thx,
     -Rob
     


______________________________ Reply Separator _________________________________
Subject: Re: [INTERFACES] Perl Interface 
Author:  James Olin Oden <joden@lee.k12.nc.us>  at INTERNET
Date:    06/22/1999 2:24 PM

Just change that $ret to @ret, and it will return the entire row. 
After that your code becomes something like:
     
   $query = "Select
username,password,knickname,emailaddy,forward,ip,date from temp";
   $conn = Pg::connectdb("dbname=$dbname"); 
   $result = $conn->exec($query);
   while (@row = $result->fetchrow) {
         @row = join("|", @row);
   }





Message-ID: <9906229300.AA930077109@ccmailgw.state.il.us>
Permalink:  ../9906229300.AA930077109@ccmailgw.state.il.us/
Also on:    postgresql.org/message-id/9906229300.AA930077109@ccmailgw.state.il.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: robert_hiltibidal_at_cms08405@ccmailgw.state.il.us, joden@lee.k12.nc.us
  Subject: Re: Re[2]: [INTERFACES] Perl Interface
  In-Reply-To: <9906229300.AA930077109@ccmailgw.state.il.us>

* 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