vendredi 20 février 2015

how to store array values into single cell in mysql table using php?


Vote count:

-1




My question is how to store string or integer array values into mysql table. inside a table all values are store into single cell, the values are separated by comma.


ex:



<input type="text" name="product[]" value="rose">
<input type="text" name="product[]" value="garlands">
<input type="text" name="product[]" value="marigold">
<input type="text" name="product[]" value="jasmine">
<input type="text" name="product[]" value="jasmine garlands">


The avobe values are insert into mysql table



$sql=mysql_query(" insert into product_sale(product_name) values (?)");


how to store all values and separaqted by comma, the stored values like



(rose,garlands,marigold,jasmine,jasmine garlands) in a single cell.


asked 58 secs ago







how to store array values into single cell in mysql table using php?

Aucun commentaire:

Enregistrer un commentaire