Tai
Member
can anyone with the skills tell me if this is valid.
I have added the following to server_functions.sqf, not sure if thats the best place, essentially I wana have the following sql called on a restart so the database is updated before the server fully starts.
is my syntax correct or am I missing anything ? dont fully understand how this is working just grabbed the _key from another file as it was clear it was calling an sql query..
thanks in advance.
this is for the base building mod, what it will do, or what I am trying to make it do is run this sql every restart which will compile every players buildings down to their current survivor id, making them able to move their buildings even if they died during the previous 3 hours ..
hope thats clear enough for you all.
I have added the following to server_functions.sqf, not sure if thats the best place, essentially I wana have the following sql called on a restart so the database is updated before the server fully starts.
Code:
_key = format["CHILD:999:UPDATE instance_deployable d LEFT JOIN (SELECT DISTINCT d.owner_id, s.unique_id FROM instance_deployable d LEFT JOIN survivor s ON s.id = d.owner_id WHERE s.is_dead =1 ) AS dead ON dead.owner_id = d.owner_id LEFT JOIN survivor live ON live.unique_id = dead.unique_id SET d.owner_id = live.id WHERE live.is_dead =0", dayZ_instance];
_data = "HiveEXT" callExtension _key;
diag_log("SERVER: Updated Build ID's...");
is my syntax correct or am I missing anything ? dont fully understand how this is working just grabbed the _key from another file as it was clear it was calling an sql query..
thanks in advance.
this is for the base building mod, what it will do, or what I am trying to make it do is run this sql every restart which will compile every players buildings down to their current survivor id, making them able to move their buildings even if they died during the previous 3 hours ..
hope thats clear enough for you all.