Releases: intercept/intercept-database
Releases · intercept/intercept-database
RC3
DB_Connection = db_createConnection ["ip", 3306, "user", "password", "db"];
_query = db_prepareQuery 'SELECT intel_missionen.`name` FROM intel_missionen WHERE intel_missionen.id > ?';
_query db_bindValue 400;
_result = DB_Connection db_queryAsync _query;
_result db_bindCallback [{
params ["_result", "_args"];
DB_RES = [db_resultToArray _result, _args];
systemChat "got result!";
}, 1];
DB_Connection = db_createConnection ["ip", 3306, "user", "password", "db"];
[] spawn {
Sleep 5;
_query = db_prepareQuery 'SELECT intel_missionen.`name` FROM intel_missionen WHERE intel_missionen.id > ?';
_query db_bindValue 400;
_start = diag_tickTime;
_result = DB_Connection db_query _query;
systemChat str ["got result!", diag_tickTime - _start];
DB_RES = [db_resultToArray _result];
};