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

Re: Using placeholders, getting unexpected SQL errors

by DrManhattan (Chaplain)
on Mar 13, 2003 at 23:01 UTC ( [id://242880]=note: print w/replies, xml ) Need Help??


in reply to Using placeholders, getting unexpected SQL errors

Using placeholders should allow you avoid quoting and escaping. Your DB driver seems to be confused as to whether $row->{'cust_phsx'} is a number or a string. You might try something like this to make the data type explicit:
$phone_insert->execute( $row->{'cust_id'}, $adtID, $phoneNumberTypes->{'Day'}, $row->{'cust_phac'}, $row->{'cust_phpx'}, $row->{'cust_phsx'} . "", $row->{'cust_phex'} );

-Matt

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found