23.02.2014, 17:29
Quote:
The best way would be to use MySQL C/C++ connector instead of the plugin, of course if you're not going to need MySQL in scripts anymore. If you're used to the plugin or you need MySQL in pawn scripts too, you can use sampgdk_invoke_native along with sampgdk_find_native to call plugin's functions.
|
Код:
new query[128]; mysql_format(MySQL, query, sizeof(query), "SELECT * FROM `%s` WHERE `bar` = '%e' AND `foobar` = '%f' LIMIT %d", "foobar", "escape'me\"please", 1.2345, 1337); // the variable 'query' contains now the formatted query (including the escaped string) mysql_tquery(MySQL, query, "OnStuffSelected", "");
Then the function to call, how to solve?
The "OnStuffSelected" mean.