So i beta tested osticket and created a like 50 tickets just to test on diffrent teams groups etc etcand now i would like to put it "online"  i deleted all tickets from ost_ticket in phpmyadmin, but it continues to add from ticket 50 so when i create a new ticket it gets ticket 51.. instead of 1what table controls the ticket ID so i can start over ?I already added all staff groups etc and i dont wanna do it all over again :)Version the latest osticket.

Search is your friend:http://forum.osticket.com/d/discussion//resolved-reset-ticket-numberhttp://forum.osticket.com/d/discussion//how-to-reset-ticket-number-back-to-zeroBoth of those are posted about older versions, but I believe that it hasn't changed.Alternatively you could drop your database and reinstall.

Yea i searched...but that line gives this error 1064 - You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use

near 'ALTER TABLE ost_ticket AUTO_INCREMENT = '0'

LIMIT 0, 30' at line 2

Your posted SQL query does not match what is posted in either thread.

uhu.... i copy pasted what you wrote yourself in the first link you provided CommentsQuotentozier April 2013 Flag1. Are you going to or have you deleted all the tickets in your database? If you have already emptied the tickets then you could use the following MySQL statement to reset the ticket id to 0.ALTER TABLE ost_ticket AUTO_INCREMENT = '0';

root@order:~# mysql -u root -pEnter password:Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 1763Server version: 5.5.38-0ubuntu0.14.04.1 (Ubuntu)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> select osten    -> ALTER TABLE ost_ticket AUTO_INCREMENT = '0';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE ost_ticket AUTO_INCREMENT = '0'' at line 2mysql>

Your first post indicated that you were using: 'ALTER TABLE ost_ticket AUTO_INCREMENT = '0'

LIMIT 0, 30';Have you already deleted the tickets?Did you use a DB prefix other than ost_?Did you try putting the table name in quotes?

All tickets and all info to those tickets has been deleted in the DB its just how i start over from 1 again Tested with " " and ' '  same error :/the prefix is ost_ yes 

I think I found your problem.mysql> select osten    -> ALTER TABLE ost_ticket AUTO_INCREMENT = '0';this should be:mysql> select <DATABASE-NAME>;mysql> ALTER TABLE ost_ticket AUTO_INCREMENT = '0';You appear to be running it as a single command .

acually yes and nothe correct way was mysql> select "DATABASE-NAME";mysql> ALTER TABLE ost_ticket AUTO_INCREMENT = 0 ;Query OK, 0 rows affected (0.18 sec)Records: 0  Duplicates: 0  Warnings: 0Problem solved thanks 

Write a Reply...