mysql dingy7 - 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: mysql dingy7 (
/showthread.php?tid=511870)
mysql dingy7 -
DamonD - 07.05.2014
If I have mysql that user under account and I have the pForcePassWordChange, I want to reset everyones mysql account dingy to 1 even if they offline with command. How I do it? I have this for group disband:
pawn Код:
format(szQuery, sizeof szQuery, "DELETE FROM `groupbans` WHERE `GroupBan` = %i", iGroupID);
mysql_function_query(MainPipeline, szQuery, false, "OnQueryFinish", "ii", SENDDATA_THREAD, iGroupID+1);
format(szQuery, sizeof szQuery, "UPDATE `accounts` SET `Member` = "#INVALID_GROUP_ID", `Leader` = "#INVALID_GROUP_ID", `Division` = "#INVALID_DIVISION", `Rank` = "#INVALID_RANK" WHERE `Member` = %i OR `Leader` = %i", iGroupID, iGroupID);
return mysql_function_query(MainPipeline, szQuery, false, "OnQueryFinish", "ii", SENDDATA_THREAD, iGroupID);
}
Re: mysql dingy7 -
iZN - 07.05.2014
sorry I don't really understand. what's dingy?
Re: mysql dingy7 -
DamonD - 07.05.2014
I mean thingy. I just need way to change all mysql accounts forcepasswordchange to 1! How I do?
Re: mysql dingy7 -
iZN - 07.05.2014
Quote:
Originally Posted by DamonD
I mean thingy. I just need way to change all mysql accounts forcepasswordchange to 1! How I do?
|
PHP код:
UPDATE `accounts` SET `forcepasswordchange` = 1
This would work I guess. Run this query.
Re: mysql dingy7 -
DamonD - 07.05.2014
So I do like a this?
pawn Код:
format(szQuery, sizeof szQuery, "UPDATE `accounts` SET `forcepasswordchange` = 1 ");
return mysql_function_query(MainPipeline, szQuery, false, "OnQueryFinish", "ii", SENDDATA_THREAD, iGroupID);
But wait what do I replace with ze iGroupID?
Re: mysql dingy7 -
DamonD - 07.05.2014
sir ?
Re: mysql dingy7 -
DamonD - 08.05.2014
ignore?
Re: mysql dingy7 -
UnknownGamer - 08.05.2014
This again, is easy.
pawn Код:
stock ForcePassChange() {
new
query[256];
format(query, sizeof(query), "UPDATE `accounts` SET `forcepasswordchange` = 1");
mysql_tquery(dbhandle, query, "", "");
}
OnGameModeInit()
{
ForcePassChange(); // Lets force the query to run!
return 1;
}
Re: mysql dingy7 -
DamonD - 08.05.2014
I had a specialized way of saving though through mysql_function_query use the code i provided as a base...
Re: mysql dingy7 -
iZN - 08.05.2014
I thought you need that query for one time? If you need to run that query for one time, simply run that query on phpMyAdmin without even messing around with the script.