pwired Posted June 6, 2014 Share Posted June 6, 2014 Hi, My question is not directly related with processwire but indirectly yes. I have to change a value in a database of a webshop. I have never done this before. I have looked many times in databases with phpmyadmin on servers but never changed a value in a table. I am sure that for most of you here this is peace a cake so I was hoping someone can tell me how to do it. I have to change the value AUTO_INCREMENT; to the new value AUTO_INCREMENT = 101; If I go in the database to the Table "orders" where I have to be in "order_id" I see this: Name Type Collation Attributes Null Default Extra Action order_id INT(11) No None auto_increment In the column Action there is an edit icon with the word "change", when I click on that a new window opens where I can edit many things but I don´t see the value auto_increment nowhere to edit. What am I missing ? I know this can be done also with tools like heidi sql but I really would like to know how to do this directly in CPanel with phpmyadmin. Link to comment Share on other sites More sharing options...
adrian Posted June 6, 2014 Share Posted June 6, 2014 Go to the Operations Tab in PMA and there you can adjust the current autoincrement value. 1 Link to comment Share on other sites More sharing options...
Craig Posted June 6, 2014 Share Posted June 6, 2014 Which shop system is it? Some systems (e.g. Magento) use separate tables that keep track of auto increment values and also have to be updated if this value is changed manually. Link to comment Share on other sites More sharing options...
pwired Posted June 7, 2014 Author Share Posted June 7, 2014 Which shop system is it? Some systems (e.g. Magento) use separate tables that keep track of auto increment values and also have to be updated if this value is changed manually. The shop system I use is AbanteCart. The admin has no option to give the id_order a start number or prefix e.g. 100 so I have to do this in the database directly. With google I found the following: run this on your mysql ALTER TABLE `orders` AUTO_INCREMENT = 101; How do I do this in CPanel under phpmyadmin ? Link to comment Share on other sites More sharing options...
pwired Posted June 7, 2014 Author Share Posted June 7, 2014 Go to the Operations Tab in PMA and there you can adjust the current autoincrement value. I have only following Tabs in phpmyadmin: Databases SQL Status Export Import Settings Variables More So there is no Operations Tab (or maybe you mean the SQL Tab) But something tells me I have to open the SQL Tab where I see following: Run SQL query/queries on server Go Do I have to enter here ALTER TABLE `orders` AUTO_INCREMENT = 101; what I found with google ? I´ll wait your answers first before I do anything there. Edit: On the left side inside phpmyadmin I didn´t select first the target database! Now I see new Tabs with also the Tab Operations! Whoa - I did it - both SQL and Operations let you change a table value ALTER TABLE orders AUTO_INCREMENT = 15000; Learned something new about databasing today 1 Link to comment Share on other sites More sharing options...
Craig Posted June 7, 2014 Share Posted June 7, 2014 Yes, select the database first from the left menu. Then you can either click the SQL tab, paste in the code and click Go. Or click on the desired table on the left menu, then click the Operations tab, and change the value in the field as mentioned by adrian. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now