PHP MYSQL - Insert into without using column names but with autoincrement field

前端 未结 4 1859
無奈伤痛
無奈伤痛 2020-12-01 07:04

I need to insert a long row with 32 fields into a MySQL table.

I\'d like to do something like this:

$sql=\"insert into tblname values (... 32 fields          


        
4条回答
  •  無奈伤痛
    2020-12-01 08:06

    Just use NULL as your first value, the autoincrement field will still work as expected:

    INSERT INTO tblname VALUES (NULL, ... 32 Fields ... )
    

提交回复
热议问题