There was this sentence in the last program:
$exec="insert into info (ename,pcname) values ('".$_POST["ename"]."','".$_POST["pcname"]. "')";
Explain the meaning of this sentence. The syntax for inserting records in SQL is:
insert into table name (field name 1, field name 2, ...) values ("value of field 1", "value of field 2", ...)
The previous program It is based on this syntax. It should be noted that I have added quotation marks to the values in the values brackets. This is because the corresponding field type is varchar. If the corresponding field type is int or the like, then it should be Remove the quotes! Be sure to pay attention.
The above introduces the detailed explanation of identity_insert PHP insert syntax, including the content of identity_insert. I hope it will be helpful to friends who are interested in PHP tutorials.