in reply to Re: help! cgi dbi
in thread help! cgi dbi
keeping everything else the same, if I put the second halfin an else block(below) the script locksup in the browser.if ($D::table == /client/i) { $sth_clients = $dbh->prepare_cached("select * from client" +); $sth_clients -> execute; while (@info = $sth_clients->fetchrow_array) { #make a has +h table...yahoo!!! $clients{$info[0]} = $info[1]; } $sth_clients ->finish; } #getlist of projects that are active $sth_project = $dbh->prepare_cached("select * from project + where active=1"); $sth_project -> execute; while (@info = $sth_project->fetchrow_array) { #make a has +h table...yahoo!!! $projectList{$info[0]} = $info[1]; } $sth_project ->finish; &DisconnectDB; print "<FONT face='Arial' size=2><b>ADD $table ";
thanksif ($D::table == /client/i) { $sth_clients = $dbh->prepare_cached("select * from client" +); $sth_clients -> execute; while (@info = $sth_clients->fetchrow_array) { #make a has +h table...yahoo!!! $clients{$info[0]} = $info[1]; } $sth_clients ->finish; } else { #getlist of projects that are active $sth_project = $dbh->prepare_cached("select * from project + where active=1"); $sth_project -> execute; while (@info = $sth_project->fetchrow_array) { #make a has +h table...yahoo!!! $projectList{$info[0]} = $info[1]; } $sth_project ->finish; } &DisconnectDB; print "<FONT face='Arial' size=2><b>ADD $table ";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: help! cgi dbi
by Masem (Monsignor) on Apr 17, 2001 at 03:29 UTC |