Can I store array values in single column in MySQL? since I have an array and want to store in database like here is some stuff which I want to execute.
var meida_array=[];
var media_length=response.media.length;
for(var i=0;i<media_length;i++){
var parsed = url.parse(response.media[i]['link']);
meida_array.push(parsed.host + parsed.path)
}
for (var i = 0; i < meida_array.length; i++) {
console.log(meida_array[i]);
}
I am getting the array but stuck in to store in database Thanks, in advance :)
Use Json stringify and store in database
var stringObj = JSON.stringify(meida_array);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With