Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Errors in Code

by Enlil (Parson)
on Apr 15, 2003 at 21:41 UTC ( #250693=note: print w/replies, xml ) Need Help??

in reply to Errors in Code

The first thing that comes pops out is that fact that you seem to be disconnecting from the database before you run the last command.(i.e.
$dbh->disconnect ||die " Failed to disconnect\n"; $dbh->do( $sql ) || die "Couldn't insert record. $!\n";

The second thing is that in the INSERT statement you are putting single quotes around $CLIENT, $RECORD, etc, which is fine but I would assume that you need to put these single quotes around the same things in the UPDATE statement and the SELECT statement if they are not numerical.

The last thing is that you should probably have a WHERE clause in your UPDATE statement so that you don't change all the records.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2023-09-25 07:11 GMT
Find Nodes?
    Voting Booth?

    No recent polls found