Jump to content

Stalemate bans members


Recommended Posts

Im hoping someone can help me with this when my members stale mate they get a message saying that they shuld have trained harder then for some reason they are unable to attack again unless i goto my PhpMyAdmin under Users/Attacking/Attcking and remove the number thats there usually the number is 252.and replacing with zero

This is the only way ive found that will unban them if unban is the wrong word,,,

Link to comment
Share on other sites

Re: Stalemate bans members


mqsql_query(UPDATE 'users' SET 'atacking' = '0' WHERE 'userid' = ".mysql_real_escape_string($userrid));

try that in the stalemate page

There's no reason to escape the $userid. Number one, $userid is derived from the $_SESSION['userid']; variable, which itself was orginally pulled from the database upon confirming the password and the login name. Therefore, $userid is not user INPUT.

However, I think it is good practice to type cast the userid anyways. Number two, you have quotes around your database tables when it should be back ticks. And the back ticks are really not required here.

Number three: you're missing a " at the beginning of the query.

Number four: You misspelled attacking, and number fiver: you misspelled userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrid.

$q_update = sprintf('update users set attacking = 0 where userid = %d' $userid);

mqsql_query($q_update, $c);


if it's version 2 of mccodes

$q_update = sprintf('update users set attacking = 0 where userid = %d' $userid);


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...