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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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);
}
From | Date | Subject | |
---|---|---|---|
Next Message | James Olin Oden | 1999-06-22 20:37:04 | Re: [INTERFACES] Perl Interface |
Previous Message | Steffen Zimmert | 1999-06-22 19:04:01 | Re: JDBC:Using Large Objects |