It should be noted that table names and field names are wrapped with operators ("`" on the "~" key in the upper left corner of the keyboard). The values after VALUES are enclosed in single quotes, which is said to be an anti-injection measure.
Copy code The code is as follows:
$sql="INSERT INTO `table name` (`field 1`,`field 2`) VALUES ('value 1', 'value 2')";
mysql_query($sql);
http://www.bkjia.com/PHPjc/322442.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322442.htmlTechArticleIt should be noted that table names and field names use operators (the "~" key in the upper left corner of the keyboard wrapped with "`"). The value after VALUES is enclosed in single quotes. It is said that...