Script URL:
Version of script: 343
Hosting company: caerta Hosting
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I have to upgrade one of the sites to the latest, but how can i reset the 1st column called ID so it will start at No 1 when a new ticket is made. All existing tickets are being deleted so we need to go back to No 1 when a new ticket is made. Once all tickets are deleted if a new one is made it does not put 1 it puts 27 which was the last ticket generated.
Resetting tracking ID no back to zero
Moderator: mkoch227
Re: Resetting tracking ID no back to zero
chrisdevelop wrote: Thu Sep 11, 2025 2:39 pm Script URL:
Version of script: 343
Hosting company: caerta Hosting
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I have to upgrade one of the sites to the latest, but how can i reset the 1st column called ID so it will start at No 1 when a new ticket is made. All existing tickets are being deleted so we need to go back to No 1 when a new ticket is made. Once all tickets are deleted if a new one is made it does not put 1 it puts 27 which was the last ticket generated.
If you are deleting all tickets, it's easier to delete the database itself, recreate it, and install HESK again.
However, if you want to keep all the previously created settings, then this (directly via SQL) is the only way.
If you need to reset the auto-increment in databases, use the following commands in your chosen database:
MySQL/MariaDB:
Code: Select all
ALTER TABLE table_name AUTO_INCREMENT = 1;
Code: Select all
ALTER SEQUENCE table_name_id_seq RESTART WITH 1;
Code: Select all
DBCC CHECKIDENT ('table_name', RESEED, 0);
Code: Select all
DELETE FROM sqlite_sequence WHERE name='table_name';
Re: Resetting tracking ID no back to zero
Just to add: if you have phpMyAdmin (most hosting companies provide it), you can open the hesk_tickets table, then on the "Operations" tab you can edit the "AUTO_INCREMENT" value to 1 and click "Go"
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools