![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 17.09.2009 Ostrzeżenie: (0%) ![]() ![]() |
Jak w MySQL wykonać coś takiego:
update data set gallery = 1 where gallery = 2 and category = 4; update data set gallery = 2 where gallery = 1 and category = 4; Chcę zamienić wszystkie gallery = 1 na 2 , a potem 2 na 1 id:1, gallery: 1 id:2, gallery: 1 id:3, gallery: 2 id:4, gallery: 2 na id:1, gallery: 2 id:2, gallery: 2 id:3, gallery: 1 id:4, gallery: 1 |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 744 Pomógł: 118 Dołączył: 14.02.2009 Skąd: poziome Ostrzeżenie: (0%) ![]() ![]() |
Musisz tzw zbuforowac sobie dane:)
update data set gallery = -1 where gallery = 2 and category = 4; update data set gallery = 2 where gallery = 1 and category = 4; update data set gallery = 2 where gallery = -1 and category = 4; warunek pole galery musi ze znakiem:) czyli nie unsig... -------------------- śmieszne obrazki
Kryzys: Ser jem spleśniały, wino piję stare i samochód mam bez dachu.. |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 1 Dołączył: 31.10.2009 Ostrzeżenie: (0%) ![]() ![]() |
Jak w MySQL wykonać coś takiego: update data set gallery = 1 where gallery = 2 and category = 4; update data set gallery = 2 where gallery = 1 and category = 4; A ja proponuję coś takiego:
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 06:56 |