bman has asked for the wisdom of the Perl Monks concerning the following question:
I am blind. Why do I get server errors?$dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1 }) +; $query = "SELECT nw_ucountry FROM $Table"; $query .= " WHERE nw_ucountry LIKE '$country'"; $sth = $dbh->prepare($query); $sth->execute; while (($qcountry) = $sth->fetchrow_array()) { unless ($country =~ /$qcountry/i) { my $mdate = `date +'%Y-%m-%d'`; my $mtime = `date +'%H:%M:%S'`; $rows = $dbh->do("INSERT INTO $Table VALUES('','$country', +'$passwd1','$email','$fname','$lname','$mdate','$mtime','')"); &header("We are done"); print "We're done.\n"; &footer(); } else { &header("Duplicate Country Name"); print "<h3>You have selected $country for your country.</h +3><p>\n"; print "<h4>It already exists in our database.</h4>\n"; print "<hr>\n"; &footer(); } } $sth->finish(); $dbh->disconnect(); exit(0);
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MySQL and PERL tribulations....
by extremely (Priest) on Nov 08, 2000 at 12:46 UTC | |
|
Re: MySQL and PERL tribulations....
by toadi (Chaplain) on Nov 08, 2000 at 14:08 UTC | |
|
Re: MySQL and PERL tribulations....
by tune (Curate) on Nov 08, 2000 at 13:52 UTC | |
by agoth (Chaplain) on Nov 08, 2000 at 15:23 UTC | |
|
Re: MySQL and PERL tribulations....
by Jonathan (Curate) on Nov 08, 2000 at 18:17 UTC | |
|
RE: MySQL and PERL tribulations....
by lachoy (Parson) on Nov 08, 2000 at 18:26 UTC | |
by bman (Sexton) on Nov 10, 2000 at 02:20 UTC | |
|
RE: MySQL and PERL tribulations....
by agoth (Chaplain) on Nov 08, 2000 at 15:24 UTC | |
by Anonymous Monk on Nov 08, 2000 at 16:43 UTC |