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
https://forums.phpfreaks.com/topic/244709-dont-quiet-understand/
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.

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?

Archived

This topic is now archived and is closed to further replies.

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