The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
subtracting 1 from a value in the datebase
I have four fields in the database
mid | title | text | display_order in the display order coloumn let's say I had values ranging from 1-5 1 2 3 4 5 Now let's say I deleted "2" After I have deleted it I want a script that will get the values after and subtract "1" from each 1 2 3 (used to be "4") 4 (used to be "5") |
#2
|
||||
|
||||
[SQL]UPDATE tablename SET displayorder = displayorder - 1 WHERE displayorder > 2[/sql]
|
#3
|
|||
|
|||
I'll try it.
Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|