Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [sql] Autoincrement a usuwanie danych
-Gość_ktos-
post
Post #1





Goście







heyka (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) mam taki problem .. operuje na tabeli
idt - int autoincrement
nazwa varchar(200)

jak dodaje nowe dane to wszystko jest oki... automatycznie mi numeruje 1,2,3.... ale jak usune np: idt=3 i pozniej znow dodaje dane to juz nie wstawia mi idt=3 tylko idt=4 ... wie ktos jak rozwiazac ten problem (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

z gory dzieki za takie noob pytanie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
bim2
post
Post #2





Grupa: Zarejestrowani
Postów: 1 873
Pomógł: 152
Dołączył: 9.04.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


UPDATE nazwa tabeli SET idt=idt-1 LIMIT id_wpisu_usunietego, 0 <- nie wiem jak dac odkad ma brac chodzi ze ma odejmowac od tegowpisu do konca
Go to the top of the page
+Quote Post
nospor
post
Post #3





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




A w czym ci te dziury przeszkadzają?
http://forum.php.pl/index.php?showtopic=30...l=autoincrement

A jesli nadal chcesz zmienic numerację autoincrementa, to:
http://forum.php.pl/index.php?showtopic=32...l=autoincrement
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 18:57