PHP mySQL - Insert new record into table with auto-increment on primary key

后端 未结 5 1239
予麋鹿
予麋鹿 2020-12-01 06:02

Wondering if there is a shorthand version to insert a new record into a table that has the primary key enabled? (i.e. not having to include the key column in the query) Lets

5条回答
  •  天涯浪人
    2020-12-01 07:00

    I prefer this syntaxis:

    $query = "INSERT INTO myTable SET fname='Fname',lname='Lname',website='Website'";
    

提交回复
热议问题