Jump to content

Dont quiet understand


Phpfr3ak

Recommended Posts

$sql = "UPDATE players SET is_banned = 1 WHERE id = $id";
mysql_query($sql);

 

Sorry really not all that great i want to also ban MASTERPLAYERID i assumed it would be;

 

$sql = "UPDATE players SET is_banned = 1 WHERE id = $id AND WHERE MASTERPLAYERID = $MASTERPLAYERID";
mysql_query($sql);

 

But its not could someone inform me how to pull this off, Thanks.

Link to comment
Share on other sites

Really vague there.  We don't know what MASTERPLAYERID is, where it is stored, or how it is populated.  If you ban a player in the players table, and the database is normalized, then you should have no problem enforcing the ban anywhere in the script.

Link to comment
Share on other sites

sorry for being so vague MASTERPLAYERID is in the player table, its basically used to control more than one account without having to use a password that works fine, the ban works as is just using;

 

$sql = "UPDATE players SET is_banned = 1 WHERE id = $id";
mysql_query($sql) or die(mysql_error());

 

But id also like it to ban everyone with thesame MASTERPLAYERID as well as the id that im banning. hope this makes more sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.