in reply to SQL Insert with blank in the middle

I think this is an SQL problem. Usually values with embedded spaces need single quotes around them, although I don't know your particular database.
  • Comment on Re: SQL Insert with blank in the middle

Replies are listed 'Best First'.
Re^2: SQL Insert with blank in the middle
by k_manimuthu (Monk) on Jul 08, 2010 at 08:15 UTC
    $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)");