Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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
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!


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2015-11-29 11:18 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls