时间:2022-03-12 08:48:55 | 栏目:Mysql | 点击:次
往mysql数据库中插入数据。以前常用
INSERT INTO 表名 (列名1,列名2…) VALUES(列值1,列值2);
$sql = "INSERT INTO products (p_title,p_price.........) VALUES ('$p_title','$p_price'............)";
$sql = " INSERT INTO products SET p_title = '$p_title', p_price = '$p_price', ... ";
$sql = "INSERT INTO products (p_title,p_price) VALUES ('苹果','5元'),('荔枝','10元'),('红枣','8元')";