My SQL AI

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

My SQL AI

Post by YoussefSiblini »

Hi,
Lets say I have 3 tables in the data base, I want the AI to start from 1 again,do I have to do every table individual or is there a way to do all of them together.

Code: Select all

ALTER TABLE antiques AUTO_INCREMENT = 1
I use the code above for the antiques table, so if I want to do that for the tables: antiques, users and members, I tried this code:

Code: Select all

ALTER TABLE antiques , users , members AUTO_INCREMENT = 1
but I am getting error.
Is it possible to do that?
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: My SQL AI

Post by McInfo »

Use three separate queries.
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Re: My SQL AI

Post by YoussefSiblini »

Thank you that did it, and I saved the queries in a MW document so I just copy and paste the queries since I have 28 queries now.
Post Reply