SA-MP Forums Archive
Remove Accounts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Remove Accounts (/showthread.php?tid=631704)



Remove Accounts - PhamHoang - 03.04.2017

I want a simple command like /deleteallaccounts in MYSQL
Even that account does not work (( connected to server))
Except I was not deleted account
Help me...


Re: Remove Accounts - GTLS - 03.04.2017

Use
PHP Code:
drop table accounts
to delete your accounts table. so all accounts will be deleted.

Dont forget to add,
PHP Code:
 CREATE TABLE IF NOT EXIST(......) // insert your Table Structure here 
in OnGameModeInit();


Re: Remove Accounts - GoldenLion - 03.04.2017

Quote:
Originally Posted by GTLS
View Post
Use
PHP Code:
drop table accounts
to delete your accounts table. so all accounts will be deleted.

Dont forget to add,
PHP Code:
 CREATE TABLE IF NOT EXIST(......) // insert your Table Structure here 
in OnGameModeInit();
Code:
DELETE FROM accounts WHERE 1
you can add something like
Code:
AND Name != 'yourname'
so it won't delete your account.


Re: Remove Accounts - DRIFT_HUNTER - 03.04.2017

pawn Code:
TRUNCATE tableName;



Re: Remove Accounts - ISmokezU - 03.04.2017

Quote:
Originally Posted by DRIFT_HUNTER
View Post
pawn Code:
TRUNCATE tableName;
Keeping in mind if the table(s) Has a relationship, Truncate wouldn't work.


Re: Remove Accounts - PhamHoang - 04.04.2017

i'll try,thanks