mysql中能不能运行一次insert插入多条数据?答:可以:这样就行了,给你举个例子:INSERT INTO `mytest`.`hello` (`id` ,`name`)VALUES (NULL , 'qq'), (NULL , 'ww'), (NULL , 'ee'), (NULL , 'rr'), (NULL , 'tt');
PHP mysql INSERT一次插入多条表单数据的方法答:myorder (pid,amount,ordernumber,time,uid,status) VALUES ";foreach ($gouwuche as $k => $v) { sql .= "(".$v['pid'].",".$v['amount'].",'$ordernumber','$time',1,0),";} sql = substr($sql, 0,strlen($sql)-1);把$gouwuche换你购物车里的内容,应该就可以了 ...