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

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 meditating upon the Monastery: (4)
As of 2021-04-11 16:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found