auto increment question
Posted: Wed Jan 26, 2011 5:38 am
hi
I am new to php.I want to know is there a way to controlling the auto-increment process.
I am making a guest book project.I want comments to store in mysql database table and appear on alternate background,like--dark,white,dark.my 'id' field is primary and auto-increment.and making alternate background by--
my problem is if i delete a comment from table then this alternative background pattern does not work.say...if I delete 4th comment whose id=4 then new comment adds with id=5,not 4.I want that to be 4th and so on. In plain---i want if a comment is deleted from table then the following comment will jump up to 1 position.how to do that????
please help
thanks in advance
I am new to php.I want to know is there a way to controlling the auto-increment process.
I am making a guest book project.I want comments to store in mysql database table and appear on alternate background,like--dark,white,dark.my 'id' field is primary and auto-increment.and making alternate background by--
Code: Select all
if($var1%2)
{
div class="grey";
.....
....
}
else
{
div class="white"
.....
.....
}
please help
thanks in advance