Answers for "insert into multiple string in varchar sql"

PHP
7

insert variables into string c#

string data = "Mr. Rogers";
var str = $"Hello {data}, how are you doing?";
Posted by: Guest on February-22-2020
1

how to bulk insert array into sql php

$sql = array(); 
foreach( $data as $row ) {
    $sql[] = '("'.mysql_real_escape_string($row['text']).'", '.$row['category_id'].')';
}
mysql_query('INSERT INTO table (text, category) VALUES '.implode(',', $sql));
Posted by: Guest on March-11-2020

Browse Popular Code Answers by Language