Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Voting script using MySQL and DBI

by greywolf (Priest)
on Aug 31, 2002 at 19:09 UTC ( [id://194375]=note: print w/replies, xml ) Need Help??


in reply to Voting script using MySQL and DBI

You might want to replace your $sth->execute() with the following:
    unless ($sth->execute()) { die $dbh->errstr() }
This will give you an error if your sql statement is bad for some reason.

If you're not already doing it try:
    use CGI::Carp qw(fatalsToBrowser);
This will send all your errors to the browser. Remember to remove this line before the script goes live.

mr greywolf

Replies are listed 'Best First'.
Re: Re: Voting script using MySQL and DBI
by lagrenouille (Acolyte) on Sep 01, 2002 at 02:43 UTC
    G'day greywolf

    ok thanks, i'll try that...
    ( I know the mySQL commands are good, I tested them from the shell by copying and pasting, worked fine... )

    I know about CGI::carp, I am using the script in an SSI situation and to have huge error messages printed out disturbs the tables a lot and is hard to read... so i've just been reading it out of the server logs

    Thanks for your help!

    Cheers
    lagrenouille

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://194375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found