Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: SQL Insert with blank in the middle

by k_manimuthu (Monk)
on Jul 08, 2010 at 08:15 UTC ( #848645=note: print w/replies, xml ) Need Help??


in reply to Re: SQL Insert with blank in the middle
in thread SQL Insert with blank in the middle

$dbh2->do("INSERT INTO PerlTest (Postcode,$_,streetCount) VALUES ('',$ +_,0)");

I think '$_' value is 'Place' and the datatype is 'varchar'.

While use a varchar values in 'values' block, the value must be in between single quote. try the below code.

$dbh2->do("INSERT INTO PerlTest (Postcode,$_,streetCount) VALUES ('',' +\$_\',0)");

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2016-08-31 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (435 votes). Check out past polls.