Answers for "bulk insert mysql"

PHP
1

mysql batch insert

INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);
Posted by: Guest on May-04-2020
0

php bulk insert mysql

$values = array(); 
foreach($data as $row ) {
    $values[] = '('.$row['id'].', "'.mysql_real_escape_string($row['name']).'")';
}
mysql_query('INSERT INTO table (id, name) VALUES '.implode(',', $sql));
Posted by: Guest on October-24-2020
0

mysql query bulk insert

INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);
Posted by: Guest on August-30-2021

Browse Popular Code Answers by Language