Page 1 of 1

easy question about autoindex in mysql

Posted: Fri Aug 01, 2003 6:57 am
by ozzsta
I reckon this will be an easy one.

I have mysql running under apache on my computer (using php triad).

I have a table and have accidentally entered more records and needed to delete them. I need the id to corelate exactly with the amount entered, i know it isn't good standard but once the stuff is in there nothings going to need changing.

now the rows in my table are illustrated like this by phpmyadmin

Row Statistic :

Format dynamic
Rows 62
Row length ø 165
Row size ø 646 Bytes
Next Autoindex 70

how do i get the autoindex back to matching the rows?

please help me :D.

Posted: Sat Aug 02, 2003 7:31 pm
by jmarcv
I THINK if you pack the table it will reset it, otherwise, delete the column and add it again. Why don't you put the value in intead of using auto_increment?

Code: Select all

<?php
select max(id)+1 as nextId from ...
?>