Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Voting script using MySQL and DBI

by greywolf (Priest)
on Aug 31, 2002 at 19:09 UTC ( #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


Comment on Re: Voting script using MySQL and DBI
Select or Download Code
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
Node Status?
node history
Node Type: note [id://194375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-04-21 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls