The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Replace Query
Hey guys, i posted this in the mysql forums but noone has replied yet, just wandering if you guys might be able to help me.
Thanks Code:
Hey guys, Im new here and i have one question. I have vbulletin forum installed on my website and obviously it uses mysql database. Here is my situation. I have this 'Thanks' system incorporated into it, which has added a field ('post_thanks_amount') to the 'post' table. When a user is thanked (in a post) the value in the 'post_thanks_amount' field goes up by one. A couple users abused this system and i want to reset the 'post_thanks_amount' value back to 'o' their 150 or so posts. (obviously to big to manually go through and do it). How can i do this. I guess the following fields would need to be used. - 'username' - 'post_thanks_amount' (they are both in the 'post' table') |
#2
|
|||
|
|||
UPDATE `user` set `post_thanks_amount` = '0' WHERE `userid` = '#USERID#' LIMIT 1;
|
#3
|
||||
|
||||
put that in and replaced #USERID# with the users id, and it came back saying:
Code:
Error SQL query: UPDATE `user` SET `post_thanks_amount` = '0' WHERE `userid` = '149' LIMIT 1 ; MySQL said: Documentation #1054 - Unknown column 'post_thanks_amount' in 'field list' UPDATE `post` set `post_thanks_amount` = '0' WHERE `userid` = '#USERID#' thanks for your help |
#4
|
|||
|
|||
oh, sorry, i dident know where your coloum was set, i thought it was under user. my bad.
|
#5
|
||||
|
||||
no problem, thanks again
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|