View Full Version : MySQL Query
slammz
06-17-2012, 06:25 PM
Recently I merged a moderator account so they lost all their mod stats. I am trying to run this MySQL query:
update moderatorlog set userid = replace(userid, ?90?, ?4?);
http://puu.sh/BCqK
That is my error!
Any help?
It looks like you've used some backticks in there when they should be single quotes. Although I haven't tried it at all, replace() is a string function while userid is an int field, so you might want this instead:
update moderatorlog set userid = 4 WHERE userid = 90
In fact, if the replace() query works at all, it would replace any 90 with 4, so if you had a moderator 190 or above 900 for instance, it would cause problems..
Paul M
06-17-2012, 07:03 PM
Why are you running queries ? Why cant you just promote them back to moderator ?
slammz
06-17-2012, 10:11 PM
Why are you running queries ? Why cant you just promote them back to moderator ?
Their moderator stats don't carry over to another user id.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.