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

Re: Errors in Code

by Enlil (Parson)
on Apr 15, 2003 at 21:41 UTC ( [id://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.

-enlil

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found