greymoose has asked for the wisdom of the Perl Monks concerning the following question:
.syntax error at /usr/lib/cgi-bin/addoffice.cgi line 62, near "$sth = $ +dbh->prepare($stmt) || die "" Can't find string terminator '"' anywhere before EOF at /usr/lib/cgi-b +in/addoffice.cgi line 63.
<!-- warning: String found where operator expected at ./addoffice.cgi +line 59, near "$sth = $dbh��prepare($stmt) || die "" (M +ight be a runaway multi�line "" string starting on line 57) -- +>
# Prepare and execute the SQL query $sth = $dbh->prepare($stmt) || die "prepare: $stmt: $DBI::errstr"; $sth->execute($office) || die <br/>"execute: $stmt: $DBI:: +errstr"; $sth->bind(undef,/$num); $sth->fetchrow(); print start_html; if ($num){ #if a match has been found $message= "The office of ".$office." is already listed.<br +>"; $url = "http://stgeorges.com/admin/addoffice.html?office=$ +office&msg=$message";<br/> $q =>print "<meta http-equiv='refresh' content='0;URL=$url +'>"; } else{ # Create the query statement - Insert the new office into the database $stmt = "INSERT into officers (off_name) values (?)"; # Prepare and execute the SQL query $sth = $dbh->prepare($stmt) || die "prepare: $stmt: $DBI:: +errstr"; $sth->execute($office) || die "execute: $stmt: $DBI::errst +r"; $sth->fetchrow(); } print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with second MySQL Query
by cosmicperl (Chaplain) on Oct 07, 2007 at 23:40 UTC | |
by greymoose (Beadle) on Oct 08, 2007 at 02:42 UTC | |
|
Re: Problem with second MySQL Query
by rhesa (Vicar) on Oct 08, 2007 at 00:07 UTC | |
by greymoose (Beadle) on Oct 08, 2007 at 02:46 UTC | |
| |
|
Re: Problem with second MySQL Query
by Cop (Initiate) on Oct 08, 2007 at 02:36 UTC | |
by greymoose (Beadle) on Oct 08, 2007 at 02:50 UTC |