CodeIgniter how to make the autoincrementable id re-insert from 1

0

Hi, I am working with CodeIgniter and in an operation it happens that all the contents of a table must be deleted, and then insert the new records.

All this happens without problems, but I need that when inserting new records the autoincrementable id re-insert from 1

Use MySql as DB

Thank you very much for your answers.

    
asked by Sagara 02.01.2018 в 02:00
source

1 answer

1

Use the truncate table_name statement instead of delete from table_name

    
answered by 02.01.2018 / 03:13
source