|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
auto_increment
The 'id' field is set to auto_increment and index
I notice that after deleting certain rows that the 'id' field did NOT change. Is there a way to set the 'id' field to the same number of the row. if so, how would I implement this? |
|
#2
|
|||
|
|||
|
You can manually change auto_increment fields, but there's absolutely no reason to.
|
|
#3
|
||||
|
||||
|
chris-au,
you want to change the id's on your rows? I can only imagine how that would mess with any relating foreign keys in other tables. as madpawn states, there's often no need to change a record's id. by personal experience, it will often cause more harm than good. ![]() |
|
#4
|
|||
|
|||
|
Quote:
OK, thanks for your answer. BUT, it does not answer my question. How can I do it? There are NO other relations when using these id's There were some entries deleted in the table and I would like to set the id's to the same 'int' as the record number (row) |
|
#5
|
|||
|
|||
|
UPDATE it like any other field.
__________________
"A pawn is the most important piece on the chessboard -- to a pawn" |
|
#6
|
|||
|
|||
|
use a trigger
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > auto_increment |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|