mgtm3
asked on
o.k i have a problem, when i delet something from a table its idea number never comes back
o.k lets say i have a table named place1
and it have
id - place
1 - idms
2 - sds
3 - dfdf
4 - dffsf
and lets say i delet id number 4
and i insert onther field
dsfef
so now the table looks like that
id - place
1 - idms
2 - sds
3 - dfdf
5 - dsfef
so where number 4 went?
i want it
and it have
id - place
1 - idms
2 - sds
3 - dfdf
4 - dffsf
and lets say i delet id number 4
and i insert onther field
dsfef
so now the table looks like that
id - place
1 - idms
2 - sds
3 - dfdf
5 - dsfef
so where number 4 went?
i want it
If you want it, then don't delete it!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how do i do that michofreha?
1-change id type from autonumber to number or int and put it unique or set it as primary key for performance
2-Select max(id) from table
3-$var=max(id)+1
4-insert into table(id,place) values($var,'dsfef')
If it you don't know how to make it work I can build the complete code for you
2-Select max(id) from table
3-$var=max(id)+1
4-insert into table(id,place) values($var,'dsfef')
If it you don't know how to make it work I can build the complete code for you
ASKER
thank uuuuuu
did it work?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thankss