Coder Social home page Coder Social logo

intercept-database's People

Contributors

dedmen avatar jokoho48 avatar jonpas avatar mcoffin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

intercept-database's Issues

Better error messages when inside of SQL

22:15:51 Error in expression <interceptOnFrame>
22:15:51   Error position: <interceptOnFrame>
22:15:51   Error Intercept-DB exception: Can't connect twice. Already connected
at
CALL StoredProcedureName(?, ?);

Bad. don't want that interceptOnFrame :/ Is there a way around that?

Add multiple queries

Some queries like
createSomething : query1; query2;
where query1 could be a first SQL statement and query2 could be a second SQL statement.

Build with cmake failed

I tried to build the project with cmake on windows.

After cloning the repo with git clone --recurse-submodules -j8 https://github.com/intercept/intercept-database.git, i used cmake to compile the project cmake -B build cmake --build build.

For the first command to run i fixed the \mariadb-connector-c\cmake\ConnectorName.cmake, but the second build command still failed.

Do i use the wrong method to compile the project or is the project broken?

Error in SQL syntax when using bindValue for table name

SQF:

_conn = dbCreateConnection "testdb"; _prep = dbPrepareQuery ["SELECT ? FROM ? WHERE ? = ?",['surname, uid','characters','uid','76561198106099573']]; _exec = _conn dbExecute _prep; _res = dbResultToArray _exec;

Error:
Error in expression <','76561198106099573']]; _exec = _conn dbExecute _prep; _res = dbResultToArray> Error position: <dbExecute _prep; _res = dbResultToArray> Error Intercept-DB exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? WHERE ? = ?' at line 1 at SELECT ? FROM ? WHERE ? = ?

dbExecuteAsync causing game crash in unscheduled environment

dbExecuteAsync has been causing my game / server to crash in an unscheduled environment, even when tied with a dbBindCallback. However it works as expected in a scheduled environment

The Wiki doesn't specify whether this should be the case but I presume it is meant to work in unscheduled?

Feedback would be greatly appreciated

InterceptDB return values always use the same data type as specified in the database

With extDB3 you have the option to return values either as string or more like Arma types.

extDB3 example:

[getSettings]
SQL1_1 = SELECT name, value FROM settings;
OUTPUT =1-string, 2

The settings table has two columns, name and value, both are varchar in the database.

Data can look like this in the table:

name value
points [30,7,15,5,10,5,10,4,2]
db_autosave true
ranked ["Sergeant","Lieutenant","Captain","Major","Sergeant","Corporal"]
mixed [10,[0,1,2],"Somename",6,1,["AAA","BBB"],5]

extDB3 returns the name in getSettings always as string and value in some directly parsable value (with parseSimpleArray).

So db_autosave db result (after parseSimpleArray) will look like this in extDB3:

["db_autosave", true]
["points", [30,7,15,5,10,5,10,4,2]]

while with interceptDB the dbResultToArray looks like this:

["db_autosave", "true"]
["points", "[30,7,15,5,10,5,10,4,2]"]

Would be nice to have a similar feature in interceptDB (and makes using existing extDB3 databases easier and more important compatible)

Connection can't be established

Hey,

this is my code:

params [
	["_configName", "", [""]],
	"_values"
];

SERVER_DB_Result        = [];
SERVER_DB_Result_parsed = [];

private _connection = dbCreateConnection "maindb";

_connection dbAddErrorHandler {
	params [
		["_errorString", "", [""]],
		["_errorCode", 0, [0]],
		["_query", "", [""]]
	];
	
	diag_log format["Error: %1", _errorString];
	diag_log format["Code: %1",  _errorCode];
	diag_log format["Query: %1", _query];
};

private _query  = dbPrepareQueryConfig [_configName, _values];
private _result = _connection dbExecuteAsync _query; 

_result dbBindCallback [{
    params ["_result", "_args"];

    SERVER_DB_Result        = dbResultToArray _result;
    SERVER_DB_Result_parsed = dbResultToParsedArray _result;
}, -1];

diag_log format["Result: %1",        SERVER_DB_Result];
diag_log format["Result parses: %1", SERVER_DB_Result_parsed];

The same credinals defined in the maindb account, are working on extDB.
But I can't establish a connection with Intercept DB. My results are empty or returning "TODO".
I don't get any errors in the logs and Intercept DB loads fine in the RPT.

no matching function for call to 'from_chars...'

I am currently trying to build intercept-database on Ubuntu 16.04 and have run into some problems. I have run out of ideas, I hope that someone here might have some.

Versions:

cmake 3.14.5
make 4.1
gcc 9.1.0

Error:

~/intercept/intercept-database$ make
[ 21%] Built target yaml-cpp
[ 22%] Built target mysql_clear_password
[ 24%] Built target dialog
[ 57%] Built target mariadb_obj
[ 57%] Built target mariadbclient
[ 58%] Built target libmariadb
[ 59%] Built target mariadb_config
[ 60%] Building CXX object mariadbpp/CMakeFiles/mariadbclientpp.dir/src/account.cpp.o
In file included from /home/schwaggot/intercept/intercept-database/mariadbpp/src/account.cpp:12:
/home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp: In function ‘T string_cast(const intercept::types::r_string&) [with T = double]’:
/home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp:78:83: error: no matching function for call to ‘from_chars(const char*, const char*, double&)’
   78 |     auto [p, ec] = std::from_chars(str.data(), str.data()+str.size(), parsedNumber);
      |                                                                                   ^
In file included from /home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp:14,
                 from /home/schwaggot/intercept/intercept-database/mariadbpp/src/account.cpp:12:
/usr/include/c++/9/charconv:596:5: note: candidate: ‘template<class _Tp> std::__detail::__integer_from_chars_result_type<_Tp> std::from_chars(const char*, const char*, _Tp&, int)’
  596 |     from_chars(const char* __first, const char* __last, _Tp& __value,
      |     ^~~~~~~~~~
/usr/include/c++/9/charconv:596:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/move.h:55,
                 from /usr/include/c++/9/bits/stl_pair.h:59,
                 from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/string:40,
                 from /home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/account.hpp:13,
                 from /home/schwaggot/intercept/intercept-database/mariadbpp/src/account.cpp:11:
/usr/include/c++/9/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = std::integral_constant<bool, false>::value; _Tp = std::from_chars_result]’:
/usr/include/c++/9/charconv:588:11:   required by substitution of ‘template<class _Tp> using __integer_from_chars_result_type = std::enable_if_t<std::__and_<std::is_integral<_Tp>, std::__not_<std::__or_<std::is_same<_Tp, bool>, std::is_same<_Tp, char16_t>, std::is_same<_Tp, char32_t>, std::is_same<_Tp, wchar_t> > > >::value, std::from_chars_result> [with _Tp = double]’
/usr/include/c++/9/charconv:596:5:   required by substitution of ‘template<class _Tp> std::__detail::__integer_from_chars_result_type<_Tp> std::from_chars(const char*, const char*, _Tp&, int) [with _Tp = double]’
/home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp:78:83:   required from here
/usr/include/c++/9/type_traits:2384:11: error: no type named ‘type’ in ‘struct std::enable_if<false, std::from_chars_result>’
 2384 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
In file included from /home/schwaggot/intercept/intercept-database/mariadbpp/src/account.cpp:12:
/home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp: In function ‘T string_cast(const intercept::types::r_string&) [with T = float]’:
/home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp:93:83: error: no matching function for call to ‘from_chars(const char*, const char*, float&)’
   93 |     auto [p, ec] = std::from_chars(str.data(), str.data()+str.size(), parsedNumber);
      |                                                                                   ^
In file included from /home/schwaggot/intercept/intercept-database/mariadbpp/include/mariadb++/conversion_helper.hpp:14,
                 from /home/schwaggot/intercept/intercept-database/mariadbpp/src/account.cpp:12:
/usr/include/c++/9/charconv:596:5: note: candidate: ‘template<class _Tp> std::__detail::__integer_from_chars_result_type<_Tp> std::from_chars(const char*, const char*, _Tp&, int)’
  596 |     from_chars(const char* __first, const char* __last, _Tp& __value,
      |     ^~~~~~~~~~
/usr/include/c++/9/charconv:596:5: note:   template argument deduction/substitution failed:
mariadbpp/CMakeFiles/mariadbclientpp.dir/build.make:62: recipe for target 'mariadbpp/CMakeFiles/mariadbclientpp.dir/src/account.cpp.o' failed
make[2]: *** [mariadbpp/CMakeFiles/mariadbclientpp.dir/src/account.cpp.o] Error 1
CMakeFiles/Makefile2:552: recipe for target 'mariadbpp/CMakeFiles/mariadbclientpp.dir/all' failed
make[1]: *** [mariadbpp/CMakeFiles/mariadbclientpp.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

You are a GOD

I love you, Discord: Diveyez#1878. Will you please shoot me a contact so we can discuss possibly allowing me help with intercept?

Unknown MySQL Error

After 3 hours of successful work, problems with writing to the database begin; reading did not check. I get the error in rpt below.

19:37:24 Error in expression <interceptOnFrame> 19:37:24 Error position: <interceptOnFrame> 19:37:24 Error Intercept-DB exception: Invalid number of bind values. Expected 16129 got 2 at INSERT INTO performance_log (type,value,timestamp) VALUES (?,?,NOW())

MySQL Server was working normally

Add worker job queue limit

Worker job queue is unlimited (I think)
we don't want to accumulate thousands of queries in there, while database is being slow.
if added from scheduled we want to sleep while waiting for there to be space in queue, in unscheduled we don't really want to freeze the game if possible.
maybe two limits, soft and hard.

Multiple connections

Hey,

I have 2 databases and create connections to them like this:

DB_CONNECTION = dbCreateConnection (getText(missionConfigFile >> "DB" >> "db_account_name"));
DB_CONNECTION_GLOBAL = dbCreateConnection (getText(missionConfigFile >> "DB" >> "db_account_name_global"));

If I now execute the first query on DB_CONNECTION, the server crashs and says that the given table name can't be found on the DB_CONNECTION_GLOBAL database. So it looks like it executes on the wrong connection, even if I execute it on the right.

This is the exact error:
"MariaDB Error(1146): Table 'arma3globaltest.players' doesn't exist"

And yes I'm sure the table exists on the DB_CONNECTION database. Sometimes if I start the server it works and sometimes it just executes on the wrong connection.

Could you check this?

Not working ubuntu 20, 64bit

Hello, console output:

20:06:34 CallExtension loaded: intercept (/home/steam/arma3/@InterceptDB/intercept.so) [(���4�
Y���X(���1��X�֛���X]

20:06:34 Intercept initialization part 1/3: 1
Segmentation fault

it's all...
what happened? :)

[Question] Number handling

Hey,

I hope I don't disturb anyone with my issues/questions.

In my database im storing the Arma3/Steam ID like this 76561198114764155.
I'm selecting the result with dbResultToParsedArray. The column type of the id is a varchar.
If I select now the id it is shown as 7.65612e+016 because the parsed command turns the string "76561198114764155" into a number (7.65612e+016) and Arma can't handle that many digits.

I don't want to select something without the parsed command. So I need a workaround.
Maybe you can add something in the intercept-database library that checks if a number has more digits than X and then put it into a string.

Best regards
nflug

MariaDB Error (Already connected)

Hey,

I get this error after some time:

205: Can't connect twice. Already connected
In function: mariadb::connection::connect
In file ......\mariadbpp\src\connection.cpp
On line
8160 writer.go:45] KeepAlive Packets are out of sync by 5
Login successful

Game crashes after SQL error

Hi, I've been using Intercept Database the last time 2 years ago.
Back then I had no problems with executing any queries. Unfortunately if I run a query now and it returns an error (SQL error) the whole server crashes.
I wrapped my dbExecute in a try-catch block and I also added a dbAddErrorHandler. The error handler is actually called right before the game crashes.

Is that error related to the application itself or is it an user error?

Best regards

dbIsConnected does not work immediately after dbCreateConnection

When I create a connection with dbCreateConnection and call dbIsConnected immediately afterwards it returns nothing.

Furthermore, calling a dbPing also immediately after dbCreateConnection crashes the game.

I run something like the following code in preinit (CfgFunctions):

_interceptdb = true;
DB_CON = dbCreateConnection "mydb";
if (dbIsConnected DB_CON) then {
diag_log ["InterceptDB connected!!!"];
if (dbPing DB_CON) exitWith {
diag_log ["InterceptDB mydb DB found!!!"];
};
_interceptdb = false;
} else {
_interceptdb = false;
diag_log ["InterceptDB NOT connected!!!"];
};

If I try a dbIsConnected later it works fine.

Btw, parse array works fine.

option to disable dynamic query creation

For server security its vital to be able to disable dbPrepareQuery on productive servers and only allow the use of stored procedures using dbPrepareQueryConfig.

Add support for null values with PrepareQuery

Sometimes you need to set columns to null in sql. Imagine you have a killtracker that saves killer and victims uid but you also want to track AI kills. In this case i would set the field null in case of AI.

Let's look at an example.
YAML

insertKill: INSERT INTO kill_log (killer_id, victim_id, weapon, distance) VALUES (?,?,?,?);

Let's have a look at the sqf code i would like to use:

params [
	["_killerId", nil, ["", nil]],
	["_victimId", nil, ["", nil]],
	["_weapon", nil, ["", nil]],
	["_distance", 0, ["", 0]]
];
private _query = dbPrepareQueryConfig ["insertKill", [_killerId, _victimId, _weapon, _distance]];
database dbExecuteAsync _query;

true

So far dbPrepareQueryConfig only supports SKALAR, STRING and BOOL Values but no nil values.
It would be pretty awesome to add translate all null reference arma3 types (objNull, groupNull, nil, null, ...) to the sql null. I think this will be pretty handy in a lot of cases :)

Executing queries always crashes the game

Running the following always crashes the game with no apparent errors:

DB_connection = dbCreateConnection "maindb";
_query = dbPrepareQuery "SELECT * FROM aar_frames";
DB_connection dbExecute _query;

Tried with multiple different execution types and with two different databases (remote and local, MariaDB and MySQL). Only running CBA_A3 and InterceptDB.

Download RPT and MDMP

dbExecute from scheduled context still "freezes?" despite documentation

According to the documentation, dbExecute, when called from a scheduled context, should

[suspend] the script like a sleep/waitUntil would do, and continues once result is ready

however, when running a non-headless server (i.e. eden play in multiplayer or "Host Server" from the ArmA III client), each call to dbExecute still appears to "freeze" all animations (and therefore likely the game). I imagine that this is still the case when running a dedicated server, but that the freeze is not as apparent as when visible in animation/etc on a client with an interface, though I cannot yet confirm that, as I have not investigated or implemented the tooling that would be required to prove it so.

Is there any information @dedmen or others could provide as to what the intended consequence of d1 = n is in callstack_item::next(...) for all relevant values of n? Short of using a debugger to attempt to reverse-engineer a waitUntil call, I don't currently know of a fantastic path to see what is occurring during the execution of the callstack_item.

It seems that setting d1 = 3 in callstack_item::next(...) is intended to indicate to the scheduler that the fiber (for lack of a better term) should yield after each that call to next(...), meaning that I would not see the animation and game "freeze" that I do right now. I have properly verified that the context canSuspend in SQF, and that the is_scheduled member of the vm_context is true on the intercept side.

To me, it seems one of two things are likely true:

  1. There is a misuse of callstack_item's next(....) API that causes the freeze
  2. There is a fight over a shared resource mutex between nigh all game threads, and the code awaiting the fulfillment of the future from the DBGameDataAsyncResult.

Thanks for reading, and I appreciate any tips/documentation that can be offered in our pursuit of an implementation of this that suits our needs :)

Can't check connected state of connection

DeadlyDaysToday at 15:22
yay, its connecting
i do have the problem of it always saying when i check it
but it does apparently connect on queries
so not something I can use to validate if connection succeeded
i guess i'll just have to validate every return and use that

DedmenToday at 15:45
oh.. Right. Because it creates a copy of the connection in the worker thread, so the original never get's a query and never connects.

dbResultToParsedArray removes some rows

Hey,

(replace # with `, can't do that because of github code insert)

my connection works fine now. But there is another problem. I have some arrays in my DB like:
"[#license_civ_air#, 0]" and the gear array "[#U_C_Poloshirt_blue#,##,##,##,##,[#ItemMap#,#ItemCompass#,#Itemwatch#],##,##,##,[],[],[],[],[],[],[##,##,##,##],[##,##,##,##],[##,##,##,##],[],[],[],[]]".

This is my result if I use dbResultToArray

__________ DB-INFO ___________
Mode: sync
Values: [""76561198114764155""]
ConfigName: queryRequestCIV
Is multi: [false,false]
Is connected: true
Ping: true
Affected rows: 1
Last insert ID: 0
Result array:

"Row: ""[[#license_civ_driver#,1],[#license_civ_boat#,0],[#license_civ_pilot#,0],[#license_civ_pilotp#,0],[#license_civ_trucking#,0],[#license_civ_gun#,0],[#license_civ_dive#,0],[#license_civ_rebel#,0],[#license_civ_hunt#,0],[#license_civ_illegalprocess#,0],[#license_civ_home#,1],[#license_civ_copper_pro#,0],[#license_civ_iron_pro#,0],[#license_civ_alu_pro#,0],[#license_civ_siliz_pro#,0],[#license_civ_silber_pro#,0],[#license_civ_zin_pro#,0],[#license_civ_glass_pro#,0],[#license_civ_kohl_pro#,0],[#license_civ_holz_pro#,0],[#license_civ_stein_pro#,0],[#license_civ_rubin_pro#,0],[#license_civ_schwefel_pro#,0],[#license_civ_bus#,0],[#license_civ_post#,0],[#license_civ_taxi#,0],[#license_civ_dir#,0],[#license_civ_airp#,0],[#license_civ_bauf#,0],[#license_civ_panne#,0],[#license_civ_ambu#,0],[#license_civ_train#,0],[#license_civ_gwsc#,0],[#license_civ_gwsk#,0],[#license_civ_gwsg#,0],[#license_civ_gwss#,0],[#license_civ_gwsm#,0],[#license_civ_gwsb#,0],[#license_civ_gwsf#,0],[#license_civ_gws#,0]]"""
"Row: 0"
"Row: ""[#U_C_Poloshirt_blue#,##,##,##,##,[#ItemMap#,#ItemCompass#,#Itemwatch#],##,##,##,[],[],[],[],[],[],[##,##,##,##],[##,##,##,##],[##,##,##,##],[],[],[],[]]"""
"Row: ""[70,80,100,0]"""
"Row: 0"
"Row: ""[5802.58,10197.9,0.0997663]"""

and this is my result if I use dbResultToParsedArray:

__________ DB-INFO ___________
Mode: sync
Values: [""76561198114764155""]
ConfigName: queryRequestCIV
Is multi: [false,true]
Is connected: true
Ping: true
Affected rows: 1
Last insert ID: 0
Result array: 

"Row: 0"
"Row: ""[70,80,100,0]"""
"Row: 0"
"Row: ""[5802.58,10197.9,0.0997663]"""

Instead of turning the array from "[#license_civ_air#, 0]" to [#license_civ_air#, 0] it just removes it.

What can I do there?

EDIT: The other arrays like ""[70,80,100,0]"" doesn't turn into [70,80,100,0] too.

support reading values from TEXT column

currently, interceptDB does not support reading from TEXT columns (TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, JSON) - SELECTs will omit creating a respective element in the result array

dbPrepareQueryConfig creates new prepared statment and doesn't delte them on query completed

After 16382 async insertions the server runs into the mysql prepared statment limit. (see below)

"[DEBUG] Can't create more than max_prepared_stmt_count statements (current value: 16382):1461:INSERT INTO movement_tracker (player_uid, session_id, pos_x, pos_y, pos_z, heading, server_time, transport_type) VALUES (?,?,?,?,?,?,?,?);" Error in expression <interceptOnFrame> Error position: <interceptOnFrame> Error Intercept-DB exception Can't create more than max_prepared_stmt_count statements (current value: 16382) at INSERT INTO movement_tracker (player_uid, session_id, pos_x, pos_y, pos_z, heading, server_time, transport_type) VALUES (?,?,?,?,?,?,?,?);

Im using this code to insert all player positions every 10 seconds into the database.

params["_uid", "_sessionId", "_serverTime", "_position", "_heading", "_transportType"];
LOG_3("UPDATING POS", _uid, _position); private _query = dbPrepareQueryConfig ["insertPosition", [_uid, _sessionId, _position select 0, _position select 1, _position select 2, _heading, _serverTime, _transportType]]; DB_PIPE dbExecuteAsync _query;

My DB query looks like:

insertPosition: INSERT INTO movement_tracker (player_uid, session_id, pos_x, pos_y, pos_z, heading, server_time, transport_type) VALUES (?,?,?,?,?,?,?,?);

It looks like the prepared statment is not getting closed after an sucessfull commit and keeps on filling the buffer on the mysql server instance. As soon the buffer with prepared statments is full no new query can be established.

Intercept work on linux 64bits ?

Hello.
I'm trying to host :
https://github.com/Xeno69/Domination

This mission pbo use Intercept.
Extdb3 work ( connect and little update/select )
But when i use Intercept, nothing append on the database.
Crendital and database config are ok ( work with EXTDB3)

I'm on Ubuntu server 20.04 x64bits !

`CallExtension 'intercept' could not be found
CallExtension 'intercept' could not be found
11:10:56 Intercept Invoker test result: ==
11:10:56 Error in expression < {false};

[_extensionName,_signalName] interceptSignal _parameters;

11:10:56 Error position: <interceptSignal _parameters;

11:10:56 Error Missing ;
11:10:56 File z\intercept\rv\addons\core\signal.sqf..., line 23
11:10:56 Error in expression < {false};

[_extensionName,_signalName] interceptSignal _parameters;

11:10:56 Error position: <interceptSignal _parameters;

11:10:56 Error Missing ;
11:10:56 File z\intercept\rv\addons\core\signal.sqf..., line 23
11:10:56 Intercept Invoker initialized.
11:10:56 Intercept Pre-Init...
11:10:56 Intercept Pre-Init Completed.
11:10:57 [CBA] (xeh) INFO: [20790,90.772,0] PreInit started. v3.15.5.210713
11:10:57 [CBA] (settings) INFO: Reading settings from settings file.
11:10:57 [CBA] (settings) INFO: Finished reading settings from settings file.
11:10:57 [CBA] (xeh) INFO: [20790,90.994,0] PreInit finished.
11:10:57 "############################# co40_domination_4_55_blufor co30_Domination #############################"
11:10:57 [20790,90.994,0,"Executing Dom fn_preinit.sqf"]
11:10:57 ["Dom d_with_ace:",false]
11:10:57 "DOM InterceptDB domination.sqf file found!"
11:10:57 Error in expression <
D_DB_CON = dbCreateConnection 'domination';

11:10:57 Error position: <'domination';

11:10:57 Error Missing ;
11:10:57 Error in expression <
D_DB_CON = dbCreateConnection 'domination';

11:10:57 Error position: <'domination';

11:10:57 Error Missing ;
11:10:57 Error in expression < then {
_query = dbPrepareQueryConfig _cname;
} else {
_query = dbPrepareQu>
11:10:57 Error position: <_cname;
} else {
_query = dbPrepareQu>
11:10:57 Error Missing ;
11:10:57 Error in expression < then {
_query = dbPrepareQueryConfig _cname;
} else {
_query = dbPrepareQu>
11:10:57 Error position: <_cname;
} else {
_query = dbPrepareQu>
11:10:57 Error Missing ;
11:10:57 Error in expression < then {
_query = dbPrepareQueryConfig _cname;
} else {
_query = dbPrepareQu>
11:10:57 Error position: <_cname;
} else {
_query = dbPrepareQu>
11:10:57 Error Missing ;
11:10:57 Error in expression < then {
_query = dbPrepareQueryConfig _cname;
} else {
_query = dbPrepareQu>
11:10:57 Error position: <_cname;
} else {
_query = dbPrepareQu>
11:10:57 Error Missing ;
11:10:57 Error in expression <
private _query = dbPrepareQueryConfig 'getTop10Players';
private res = D_DB>
11:10:57 Error position: <'getTop10Players';
private res = D_DB>
11:10:57 Error Missing ;
11:10:57 Error in expression <
private _query = dbPrepareQueryConfig 'getTop10Players';
private res = D_DB>
11:10:57 Error position: <'getTop10Players';
private res = D_DB>
11:10:57 Error Missing ;
11:10:57 "Dom InterceptDB domination.sqf loaded and compiled"
11:10:57 ["Dom Intercept DB created:",any]
11:10:57 ["DOM d_database_found:",true,"d_db_type:",1]
11:10:57 "Dom Database result loading dom_settings:"
11:10:57 [20790,90.999,0,"Executing Dom initcommon.sqf"]
11:10:57 [20790,91.038,0,"Dom initcommon.sqf processed"]
11:10:57 Weather was forced to change
`

Add support for %

Hey there,

My query looks like this: SELECT id FROM gangs WHERE members LIKE %?% AND active=1
The problem here is that you cannot leave the % without a ' because you get an error then.
And if I put the ' arround the %?% there is an error because it can't find the ? and says:


__________ DB-ERROR ___________
Error: Invalid number of bind values. Expected 0 got 1
Code: 2
Query: SELECT id FROM gangs WHERE members LIKE '%?%' AND active=1

Error in expression <interceptOnFrame>
Error position: <interceptOnFrame>
Error Intercept-DB exception Invalid number of bind values. Expected 0 got 1
at
SELECT id FROM gangs WHERE members LIKE '%?%' AND active=1

And if some error occurs with intercept-db the whole arma3 server just crashes.
Maybe you can fix that in future.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.