Skip site navigation (1) Skip section navigation (2)

Re[2]: [INTERFACES] Perl Interface

From: robert_hiltibidal_at_cms08405(at)ccmailgw(dot)state(dot)il(dot)us
To: <joden(at)lee(dot)k12(dot)nc(dot)us>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re[2]: [INTERFACES] Perl Interface
Date: 1999-06-22 19:44:48
Message-ID: 9906229300.AA930077109@ccmailgw.state.il.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
     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(at)lee(dot)k12(dot)nc(dot)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);
   }



Responses

pgsql-interfaces by date

Next:From: James Olin OdenDate: 1999-06-22 20:37:04
Subject: Re: [INTERFACES] Perl Interface
Previous:From: Steffen ZimmertDate: 1999-06-22 19:04:01
Subject: Re: JDBC:Using Large Objects

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group