mysql - Inserting into table with skipping the auto incremented column without the need to write the columns' names -
Then I have this large table with more than 30 columns, and what I wanted to do would include its values But the first skipping column on the OCC is 'ID' which automatically increments, so I have two options which I can think of, one is: 'table name' col2 , Col3, col4 ... INESERT INSERT Val2, val3, val4 But it takes a long time to copy the names of columns, Having Uti is likely to be missing a letter. Then another option will bring the last ID in the table and edit the next ID itself: $ last_row_query = mysql_query ("Select ID from order order by ID DESC limit 1"); If (! $ Last_row_query) {dead ('invalid query:' .mysql_error ()); } $ Last_row = mysql_fetch_assoc ($ last_row_query); $ Last_id = $ last_row ['id']; $ Current_id = $ last_id + 1; and then the query will be INSERT 'table name' VALUES $ current_id, val2, val3, val4 Is there any difference in the efficiency of those two methods? And is there any way more r...