> mmccaws2 <mmcc
@comcast.net> writes:
> > The problem is that I have 17 entries in mysql database and when I run
> > my sub routine it only returns the entries that are not in the first
> > two rows.
> > my $sth = $dbh->prepare($allfeed_sql) or die "Couldn't prepare:
> > " . $dbh->errstr;
> > $sth->execute or die "Couldn't execute: " . $sth->errstr;
> > my @tablefeeds = $sth->fetchrow_array;
> Now the first row is in @tablefeeds.
> > # is there already a row with this username?
> > if (!$sth->fetchrow_array) {
> You've fetched the second row and thrown it away.
> > return 0;
> > }
> > my @feeds;
> > while (my $row = $sth->fetchrow_hashref) {
> > my $feed =
> > Feeds::Feed->new_feed(title => $row->{title},
> > url => $row->{url},
> > xml => $row->{xml},
> > date => $row->{date},
> > feed_id => $row->{feed_id});
> > push (@feeds, $feed);
> > }
> > return @feeds;
> This loop puts the rest of the rows, starting with the third, in @feeds
> and returns that.
> sherm--
> --
> Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> Cocoa programming in Perl:http://camelbones.sourceforge.net
Fantastic. I thought the while would start from scratch, but I see