Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
0020001 1134539 1234975 3446890 3456843 2234535
foreach my $key_expal (%expal) { if($order == 2 ){ $sql = "SELECT c_name FROM tbl_admin WHERE day = '$d' AND +month = '$m_num' and year = '$y' AND expal = '$key_expal' AND status= + '2' ORDER BY c_name "; }elsif($order == 3 ){ $sql = "SELECT * FROM tbl_admin WHERE day = '$d' AND month + = '$m_num' and year = '$y' AND expal = '$key_expal' AND status= '2' +ORDER BY expal"; }else{ $sql = "SELECT * FROM tbl_admin WHERE day = '$d' AND month + = '$m_num' and year = '$y' AND expal = '$key_expal' AND status= '2'" +; } $sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; while ($pointer = $sth->fetchrow_hashref){ my $expalnum=$pointer->{'expal'}; my $comp=$pointer->{'c_name'}; my $cltime=$pointer->{'time'}; my $cltime2=$pointer->{'time2'}; my $last_name=$pointer->{'last_name'}; my $clnum=$pointer->{'c_number'}; my $status=$pointer->{'status'}; print "<br>L 265 - <b>$comp</b> $expalnum"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Foreach Problem! Help!!!
by halley (Prior) on May 25, 2004 at 15:09 UTC | |
by Anonymous Monk on May 25, 2004 at 15:27 UTC | |
|
Re: Foreach Problem! Help!!!
by Roy Johnson (Monsignor) on May 25, 2004 at 16:06 UTC | |
by Anonymous Monk on May 25, 2004 at 18:58 UTC | |
by Anonymous Monk on May 25, 2004 at 17:32 UTC | |
by Roy Johnson (Monsignor) on May 25, 2004 at 18:25 UTC | |
by Anonymous Monk on May 25, 2004 at 18:57 UTC | |
by Roy Johnson (Monsignor) on May 25, 2004 at 19:31 UTC | |
by Anonymous Monk on May 25, 2004 at 17:43 UTC | |
|
Re: Foreach Problem! Help!!!
by xorl (Deacon) on May 25, 2004 at 15:44 UTC |