[Cialug] phpmysql ?

Nathan C. Smith cialug@cialug.org
Mon, 14 Feb 2005 13:57:12 -0600


You mean you want the id column to be consecutive starting at a certain
number?

In most cases it isn't a good idea to mess with id columns, especially if
they are a foreign key in use in another table.

Assuming it is your table and you made it and the id column does not appear
in another table, why not copy the table into a new, temporary table, delete
and then recreate the original table?

If what you are after is an always consecutively numbered column (why?) you
could just add a new column and renumber it consecutively in whatever order
you like whenever you feel like it.

Alternatively, you could tell us what you are actually trying to accomplish
and maybe we could deliver some ideas on how to achieve that.

-Nate

-----Original Message-----
From: albus [mailto:albus@iowaconnect.com] 
Sent: Monday, February 14, 2005 1:46 PM
To: Central Iowa Linux Group
Subject: [Cialug] phpmysql ?



Is there no way to reindex the id column in phpmysql for a mysql database 
table?

I've tried about every thing to reindex them.

Next step, delete the table and redo it in a text editor. There has to be a 
better way.

Joel 


_______________________________________________
Cialug mailing list
Cialug@cialug.org
http://cialug.org/mailman/listinfo/cialug