Jump to content

concatenate the values of some columns of csv into one String column of table


ramyakumar

Recommended Posts

Hello,

I am trying insert the values of csv file into a table. I want to concatenate the values of some columns of csv into one String column of table by delimiting them my commas.

 

$im="INSERT into TB1 (col1, col2 ) values ('$a[2]','$a[3]')";
$b = "";
$b=".'$a[6]'."||".'$a[7]'."||".'$a[8]'."||".'$a[9]'.";
$im1=$im+"UPDATE TB1 set latlng=.'$aline'.";
mysql_query($im1) OR die(mysql_error());

I need to enter the value of $a[6] till $a[9] into a string column with delimiters and insert into the column col3 of TB1 with value as $a[4].

I am stuck up here could anyone help me with this issue.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.