Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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)");


Comment on Re^2: SQL Insert with blank in the middle
Select or Download Code

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 studying the Monastery: (4)
As of 2015-07-04 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls