Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 chilling in the Monastery: (6)
As of 2014-09-17 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (99 votes), past polls