The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
SQL Query to add one columns value to another colum
OK So I had several add-ons installed at once... First the Casino which stored cash as casino_cash in the user table... then I had the Gameroom which uses gameroom_cash. Also I have stock trader that doesn't store any value in the user table but can use any field I set. After upgrading to the Gameroom I never changed the field in Stock Trader to gameroom_cash until today so for sometime they were being tracked separately. What I need to do now is run a query where I set the gameroom_cash value to itself+casino_cash value- if it was a php variable it would be something like gameroom_cash = gameroom_cash + casino_cash- but I don't know how to do this as a sql statement. I searched google but most entries that came up were for me to add a new column rather then add value to a column.
|
#2
|
||||
|
||||
You can run the query to pull the info for both columns and then add it in the PHP code after the query.
|
#3
|
||||
|
||||
That's true... just wondering if it was possible as a query instead of writing a script... but the script would be so easy that it probably isn't worth typing this response... LOL.
|
#4
|
||||
|
||||
There is no way that I know of to do a query that will add the columns like you want. MySQL doesn't work that way.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|