Link to home
Start Free TrialLog in
Avatar of mgtm3
mgtm3Flag for Israel

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
Avatar of Rob Siklos
Rob Siklos
Flag of Canada image

If you want it, then don't delete it!
ASKER CERTIFIED SOLUTION
Avatar of michofreiha
michofreiha
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mgtm3

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
Avatar of mgtm3

ASKER

thank uuuuuu
did it work?
SOLUTION
Avatar of Bernard Savonet
Bernard Savonet
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mgtm3

ASKER

thankss