mysql dingy7
#1

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);
}
Reply
#2

sorry I don't really understand. what's dingy?
Reply
#3

I mean thingy. I just need way to change all mysql accounts forcepasswordchange to 1! How I do?
Reply
#4

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 `accountsSET `forcepasswordchange` = 
This would work I guess. Run this query.
Reply
#5

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?
Reply
#6

sir ?
Reply
#7

ignore?
Reply
#8

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;
}
Reply
#9

I had a specialized way of saving though through mysql_function_query use the code i provided as a base...
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)