20.10.2015, 18:25
I was wondering if you can do a callback function which is called after an INSERT or UPDATE. It will be very usefull to synchronize a panel with the server without a timer or a separate table of recent actions.
native cache_affected_rows(connectionHandle = 1); native cache_insert_id(connectionHandle = 1); native cache_warning_count(connectionHandle = 1);
You can execute any SQL statement you want; the result callback is always called if the statement was successfully executed by the server.
All cache_get_ natives will obviously not work if you send an INSERT or UPDATE query, however these three will: Код:
native cache_affected_rows(connectionHandle = 1); native cache_insert_id(connectionHandle = 1); native cache_warning_count(connectionHandle = 1); |
Oh, this plugin changed a lot from the last version I remember... what is pool_size from mysql_connect used for? I don't understand mysql_pquery neither, can you add more information to it? Thanks a lot.
Great plugin by the way. |
Originally Posted by SA-MP Wiki
The difference between this native and mysql_tquery() is, that this type of query uses multi-threading, thus it's faster depending on how many connections are used. The number of connections can be specified in mysql_connect() through the pool_size parameter. Each connection resembles a thread.
|
As always, good job and thank you for your time to make this plugin even better.
|
R39-4 has been released.
Changes: - bug-fix: queries are not completely executed before disconnection - bug-fix: 'orm_select' / 'orm_load' crashes when a NULL value is being loaded Download is, as always, on GitHub. |
mysql_format(MySQLCon, QuerY, sizeof(QuerY), "UPDATE `players` SET `Money`=%d WHERE `ID`=%d", pInfo[playerid][pMoney],pInfo[playerid][pID]); mysql_tquery(MySQLCon, QuerY);
mysql_format(MySQLCon, QuerY, sizeof(QuerY), "UPDATE `players` SET `Money`=%d WHERE `ID`=%d", pInfo[playerid][pMoney],pInfo[playerid][pID]); mysql_pquery(MySQLCon, QuerY);