ProSpeedy123
Member
Could someone quickly tell me what the command in sql to change all the owner ids of tents and to delete all the dead bodies
Thanks
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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
WHERE is_dead = 1 AND id NOT IN (SELECT DISTINCT owner_id FROM instance_deployable);