From 900b91d3867b5905258f96f710b413fe960163f0 Mon Sep 17 00:00:00 2001 From: Zepheris Date: Mon, 5 Mar 2018 21:53:38 -0700 Subject: [PATCH] Forgot to Add parts for ExAd Vehicle garage --- @ExileServer/extDB/sql_custom_v2/exile.ini | 34 +++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/@ExileServer/extDB/sql_custom_v2/exile.ini b/@ExileServer/extDB/sql_custom_v2/exile.ini index 2ead5bc..ebf2f09 100644 --- a/@ExileServer/extDB/sql_custom_v2/exile.ini +++ b/@ExileServer/extDB/sql_custom_v2/exile.ini @@ -234,8 +234,10 @@ SQL1_1 = DELETE FROM vehicle WHERE id = ? Number Of Inputs = 1 SQL1_INPUTS = 1 +//ExAd [loadVehicleIdPage] -SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL LIMIT ?,? +;SQL1_1 = SELECT id FROM vehicle LIMIT ?,? +SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL AND territory_id IS NULL LIMIT ?,? Number Of Inputs = 2 SQL1_INPUTS = 1,2 OUTPUT = 1 @@ -612,15 +614,19 @@ SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? Number Of Inputs = 1 SQL1_INPUTS = 1 +//ExAd ; Marks for deletion vehicles that were not used within ? days [markDeleteOldVehicles] -SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND deleted_at IS NULL +; SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) +SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL Number Of Inputs = 1 SQL1_INPUTS = 1 +//ExAd ; Removes vehicles that were not used within ? days [deleteOldVehicles] -SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) +;SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) +SQL1_1 = DELETE FROM vehicle WHERE territory_id IS NULL AND deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) Number Of Inputs = 1 SQL1_INPUTS = 1 @@ -779,4 +785,24 @@ SQL1_INPUTS = 1,2,3 [ResetTree] SQL1_1= UPDATE tree SET regrow = '0' WHERE id = ? Number of Inputs = 1 -SQL1_INPUTS = 1 \ No newline at end of file +SQL1_INPUTS = 1 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Virtual Garage related queries | ADDED BY [ExAd]Jan +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[loadTerritoryVehicles] +SQL1_1 = SELECT id, class FROM vehicle WHERE territory_id = ? +Number Of Inputs = 1 +SQL1_INPUTS = 1 +OUTPUT = 1,2-STRING + +[loadVehFromVG] +SQL1_1 = UPDATE vehicle SET territory_id = NULL WHERE id = ? +Number Of Inputs = 1 +SQL1_INPUTS = 1 + +[loadVehToVG] +SQL1_1 = UPDATE vehicle SET territory_id = ? WHERE id = ? +Number Of Inputs = 2 +SQL1_INPUTS = 1,2 \ No newline at end of file