Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Run export data from links via telnet

Quote Reply
Run export data from links via telnet
Hi

I want to export the data from links where it adds the category id and name.

It doesn't seem to run from the browser.

does someone know the command to do this and save to a file.

Thanks in advance

dregs2
Quote Reply
Re: [dregs2] Run export data from links via telnet In reply to
You just want the category id and name?

Code:
my $sth = $DB->table('Category')->select( 'ID', 'Name' );
while (my $row = $sth->fetchrow_hashref) {
$output .= "$row->{ID}|$row->{Name}\n";
}
$sth->finish();

open FH, ">cats.txt" or die $!;
print FH $output;
close FH;

Last edited by:

Paul: Jul 15, 2002, 8:03 AM