pickledegg has asked for the wisdom of the Perl Monks concerning the following question:
foreach $page(keys %yearly_page_hits){ $dbh = DBI->connect("DBI:mysql:$sqlDatabaseName:","$mysqlUsername"," +$mysqlPassword") or die "Connection Error: $DBI::errstr\n"; $sql = "select count(page) from counter_monthly where page='$page'"; $cursor = $dbh->prepare($sql); $cursor->execute or die "SQL Error: $DBI::errstr\n"; while (@row = $cursor->fetchrow_array) { print "while loop the row for $page is @row<br><br>\n"; $new_monthly_page_hits{$page}=@row; print "whileloop".$new_monthly_page_hits{$page}."<br><br>"; #push(@yearly_pages,@row); #sort(@yearly_pages); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hashing up hashes
by Corion (Patriarch) on May 12, 2006 at 12:12 UTC | |
|
Re: Hashing up hashes
by ptum (Priest) on May 12, 2006 at 13:40 UTC | |
by kwaping (Priest) on May 12, 2006 at 15:06 UTC | |
|
Re: Hashing up hashes
by liverpole (Monsignor) on May 12, 2006 at 12:14 UTC | |
|
Re: Hashing up hashes
by blazar (Canon) on May 12, 2006 at 12:15 UTC | |
|
Re: Hashing up hashes
by ruzam (Curate) on May 12, 2006 at 15:08 UTC |