Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
so....what am i screwing up, because i get errors out the wazoo.# make the query $array_ref = $dbh->selectall_arrayref("SELECT name,height,width,date F +ROM mydatabase"); # drop it all into a hash named %DB foreach $i ($$array_ref) { if($Sort == "byname") { $DB{ $$i[0] } = [ $$i[1],$$i[2],$$i[3] ]; } elsif($Sort == "bydate") { $DB{ $$i[3] } = [ $$i[1],$$i[2],$$i[0] ]; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI help, aka confused newbie
by cchampion (Curate) on May 09, 2004 at 18:18 UTC | |
|
Re: DBI help, aka confused newbie
by Juerd (Abbot) on May 09, 2004 at 19:51 UTC | |
|
Re: DBI help, aka confused newbie
by matija (Priest) on May 09, 2004 at 17:49 UTC | |
|
Re: DBI help, aka confused newbie
by TilRMan (Friar) on May 10, 2004 at 09:03 UTC | |
|
Re: DBI help, aka confused newbie
by EvanK (Chaplain) on May 13, 2004 at 01:52 UTC | |
|
Re: DBI help, aka confused newbie
by Anonymous Monk on May 10, 2004 at 06:25 UTC |