btk5h / skript-db

MIT License
5 stars 5 forks source link

How to use [unsafe] ? #24

Closed github-usrname closed 4 years ago

github-usrname commented 4 years ago

Query Result From : execute "UPDATE table SET column=1 WHERE name=%{123}%" in {sql} && execute "UPDATE table SET column=1 WHERE name={123}" in {sql} && execute "UPDATE table SET column=1 WHERE name=%player%" in {sql} && execute "UPDATE table SET column=1 WHERE name='%player%'" in {sql} are NONE results

Only execute "UPDATE table SET column=1 WHERE name='Admin'" in {sql} does >>> Affected 1 Row (By MYSQL) so How to use the Unsafe ? because i want to use DYNAMIC QUERIES

github-usrname commented 4 years ago

nad my @mails are not " Angry " just i get frustrated when someone mistakes me for a Child and Starts Explaining NONE-RELATED stuff :) thanks in Advance Aswell as , i loved to Avoid all these " Github " Posts stuff , nothing was wrong with @mails , but since you asked me so Politely im going to Agree with you , and do it the way you want

btk5h commented 4 years ago

You most likely do not to use unsafe. Have you tried using player's uuid or player's name instead of player?

github-usrname commented 4 years ago

execute "UPDATE table SET column=1 WHERE name='Admin'" in {sql} === SUCCESSFULL but i want To USE THE OTHER METHODS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

github-usrname commented 4 years ago

i Want to USE execute "UPDATE table SET column=1 WHERE name=%{123}%" in {sql} && execute "UPDATE table SET column=1 WHERE name={123}" in {sql}

github-usrname commented 4 years ago

execute "UPDATE table SET column=1 WHERE name=%{123}%" in {sql} && execute "UPDATE table SET column=1 WHERE name={123}" in {sql}

Doesnt Return ANY CHANGE TO DATABASE STATE

btk5h commented 4 years ago

What is the type of {123}? Where are you setting that variable?

github-usrname commented 4 years ago

String

set {123} to "%player%" IS NOT GONNA WORK FOR MYSQL BECAUSE SIGNLE QUOTES ARE MISSING

How do you think , So Far if i made it To WORK and im Telling you its WORKING with Plain TEXT INSIDE , And Why its not Working with EXPRESSION , you are asking me , Where do i Sett it , if you ask me , it doesnt Matter where you SETT it as Far as its Working , BUT THE EXPRESSION IS NOT WORKING !!!!!!!!!!!!!! Focus on that Please and Explain to me why the Expression is not Working ? and UID of PLAYER IS NOT GONNA WORK AT ALL FOR ME IN MY CASE

btk5h commented 4 years ago

What version of Skript are you using? This might be related to a recent change to Skript.

github-usrname commented 4 years ago

OK , Before we Continue , i want you To REad the FOLLOWING first !!! ( %player% === PlayerName )

set {var} to " '%player%' " execute "UPDATE table SET column=1 WHERE name=%{var}%" in {sql} # NO CHANGES delete {var}

set {var} to player execute "UPDATE table SET column=1 WHERE name='{var}' " in {sql} # NO CHANGES delete {var}

execute "UPDATE table SET column=1 WHERE name=%player%" in {sql} # NO CHANGES

execute "UPDATE table SET column=1 WHERE name='%player%'" in {sql} # NO CHANGES

aswell with Console Prompt that EXPRESSIONS cannot be Quoted

Only execute "UPDATE table SET column=1 WHERE name='Admin'" in {sql} in this Case >> WHERE name= ' Plain Text ' Works

[03:01:02 INFO]: [Skript] Enabling Skript v2.4.1 [03:01:02 INFO]: [Skript] Enabling Skript v2.4.1 [03:01:02 INFO]: [Skript] Enabling Skript v2.4.1

Warning, you've not updated in a while! Please download a new build as per instructions from https://papermc.io/downloads System Info: Java 1.8 (Java HotSpot(TM) 64-Bit Server VM 25.241-b07) Host: Windows 10 10.0 (amd64) Loading libraries, please wait... [03:00:49 INFO]: Starting minecraft server version 1.15.2 [03:00:49 INFO]: Loading properties [03:00:49 INFO]: This server is running Paper version git-Paper-66 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT) [03:00:49 INFO]: Debug logging is disabled [03:00:49 INFO]: Server Ping Player Sample Count: 12 [03:00:49 INFO]: Using 4 threads for Netty based IO [03:00:49 INFO]: Default game type: SURVIVAL [03:00:49 INFO]: Generating keypair [03:00:50 INFO]: Starting Minecraft server on *:25565 [03:00:50 INFO]: Using default channel type [03:00:50 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug! [03:00:54 WARN]: Legacy plugin dynmap v3.0-beta-10-257 does not specify an api-version. [03:00:54 WARN]: Legacy plugin skript-db v0.2.1 does not specify an api-version. [03:00:54 WARN]: Legacy plugin Skript-Paper v1.3.0 does not specify an api-version. [03:00:54 INFO]: [dynmap] Loading dynmap v3.0-beta-10-257 [03:00:54 INFO]: [dynmap] version=git-Paper-66 (MC: 1.15.2) [03:00:54 INFO]: [dynmap] Unload queue not found - default to unload all chunks [03:00:54 INFO]: [dynmap] inhabitedTicks field not found - inhabited shader not functional [03:00:54 INFO]: [dynmap] Mod Support API available [03:00:54 INFO]: [SkinsRestorer] Loading SkinsRestorer v13.7.5 [03:00:54 INFO]: [Skript] Loading Skript v2.4.1 [03:00:54 INFO]: [Multiverse-Core] Loading Multiverse-Core v4.1.0-b775 [03:00:54 INFO]: [skript-db] Loading skript-db v0.2.1 [03:00:54 INFO]: [Skript-Paper] Loading Skript-Paper v1.3.0 [03:00:54 INFO]: Server permissions file permissions.yml is empty, ignoring it [03:00:54 WARN]: *** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! [03:00:54 WARN]: The server will make no attempt to authenticate usernames. Beware. [03:00:54 WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. [03:00:54 WARN]: To change this, set "online-mode" to "true" in the server.properties file. [03:00:54 INFO]: Preparing level "world" [03:00:55 INFO]: Reloading ResourceManager: Default, bukkit [03:00:55 INFO]: Loaded 6 recipes [03:00:56 INFO]: -------- World Settings For [world] -------- [03:00:56 INFO]: View Distance: 10 [03:00:56 INFO]: Item Despawn Rate: 6000 [03:00:56 INFO]: Item Merge Radius: 2.5 [03:00:56 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true [03:00:56 INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200 [03:00:56 INFO]: Nerfing mobs spawned from spawners: false [03:00:56 INFO]: Custom Map Seeds: Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313Ocean: 14357621 Shipwreck: 165745295 Slime: 987234911 [03:00:56 INFO]: Zombie Aggressive Towards Villager: true [03:00:56 INFO]: Mob Spawn Range: 8 [03:00:56 INFO]: Experience Merge Radius: 3.0 [03:00:56 INFO]: Max TNT Explosions: 100 [03:00:56 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64 [03:00:56 INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1 [03:00:56 INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true [03:00:56 INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms [03:00:56 INFO]: Cactus Growth Modifier: 100% [03:00:56 INFO]: Cane Growth Modifier: 100% [03:00:56 INFO]: Melon Growth Modifier: 100% [03:00:56 INFO]: Mushroom Growth Modifier: 100% [03:00:56 INFO]: Pumpkin Growth Modifier: 100% [03:00:56 INFO]: Sapling Growth Modifier: 100% [03:00:56 INFO]: Beetroot Growth Modifier: 100% [03:00:56 INFO]: Carrot Growth Modifier: 100% [03:00:56 INFO]: Potato Growth Modifier: 100% [03:00:56 INFO]: Wheat Growth Modifier: 100% [03:00:56 INFO]: NetherWart Growth Modifier: 100% [03:00:56 INFO]: Vine Growth Modifier: 100% [03:00:56 INFO]: Cocoa Growth Modifier: 100% [03:00:56 INFO]: Bamboo Growth Modifier: 100% [03:00:56 INFO]: SweetBerry Growth Modifier: 100% [03:00:56 INFO]: Kelp Growth Modifier: 100% [03:00:56 INFO]: -------- World Settings For [world_nether] -------- [03:00:56 INFO]: View Distance: 10 [03:00:56 INFO]: Item Despawn Rate: 6000 [03:00:56 INFO]: Item Merge Radius: 2.5 [03:00:56 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true [03:00:56 INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200 [03:00:56 INFO]: Nerfing mobs spawned from spawners: false [03:00:56 INFO]: Custom Map Seeds: Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313Ocean: 14357621 Shipwreck: 165745295 Slime: 987234911 [03:00:56 INFO]: Zombie Aggressive Towards Villager: true [03:00:56 INFO]: Mob Spawn Range: 8 [03:00:56 INFO]: Experience Merge Radius: 3.0 [03:00:56 INFO]: Max TNT Explosions: 100 [03:00:56 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64 [03:00:56 INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1 [03:00:56 INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true [03:00:56 INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms [03:00:56 INFO]: Cactus Growth Modifier: 100% [03:00:56 INFO]: Cane Growth Modifier: 100% [03:00:56 INFO]: Melon Growth Modifier: 100% [03:00:56 INFO]: Mushroom Growth Modifier: 100% [03:00:56 INFO]: Pumpkin Growth Modifier: 100% [03:00:56 INFO]: Sapling Growth Modifier: 100% [03:00:56 INFO]: Beetroot Growth Modifier: 100% [03:00:56 INFO]: Carrot Growth Modifier: 100% [03:00:56 INFO]: Potato Growth Modifier: 100% [03:00:56 INFO]: Wheat Growth Modifier: 100% [03:00:56 INFO]: NetherWart Growth Modifier: 100% [03:00:56 INFO]: Vine Growth Modifier: 100% [03:00:56 INFO]: Cocoa Growth Modifier: 100% [03:00:56 INFO]: Bamboo Growth Modifier: 100% [03:00:56 INFO]: SweetBerry Growth Modifier: 100% [03:00:56 INFO]: Kelp Growth Modifier: 100% [03:00:56 INFO]: -------- World Settings For [world_the_end] -------- [03:00:56 INFO]: View Distance: 10 [03:00:56 INFO]: Item Despawn Rate: 6000 [03:00:56 INFO]: Item Merge Radius: 2.5 [03:00:56 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true [03:00:56 INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200 [03:00:56 INFO]: Nerfing mobs spawned from spawners: false [03:00:56 INFO]: Custom Map Seeds: Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313Ocean: 14357621 Shipwreck: 165745295 Slime: 987234911 [03:00:56 INFO]: Zombie Aggressive Towards Villager: true [03:00:56 INFO]: Mob Spawn Range: 8 [03:00:56 INFO]: Experience Merge Radius: 3.0 [03:00:56 INFO]: Max TNT Explosions: 100 [03:00:56 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64 [03:00:56 INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1 [03:00:56 INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true [03:00:56 INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms [03:00:56 INFO]: Cactus Growth Modifier: 100% [03:00:56 INFO]: Cane Growth Modifier: 100% [03:00:56 INFO]: Melon Growth Modifier: 100% [03:00:56 INFO]: Mushroom Growth Modifier: 100% [03:00:56 INFO]: Pumpkin Growth Modifier: 100% [03:00:56 INFO]: Sapling Growth Modifier: 100% [03:00:56 INFO]: Beetroot Growth Modifier: 100% [03:00:56 INFO]: Carrot Growth Modifier: 100% [03:00:56 INFO]: Potato Growth Modifier: 100% [03:00:56 INFO]: Wheat Growth Modifier: 100% [03:00:56 INFO]: NetherWart Growth Modifier: 100% [03:00:56 INFO]: Vine Growth Modifier: 100% [03:00:56 INFO]: Cocoa Growth Modifier: 100% [03:00:56 INFO]: Bamboo Growth Modifier: 100% [03:00:56 INFO]: SweetBerry Growth Modifier: 100% [03:00:56 INFO]: Kelp Growth Modifier: 100% [03:00:56 INFO]: Preparing start region for dimension 'world'/minecraft:overworld [03:00:56 INFO]: Preparing spawn area: 0% [03:00:57 INFO]: Preparing spawn area: 0% [03:00:57 INFO]: Preparing spawn area: 24% [03:00:58 INFO]: Preparing spawn area: 100% [03:00:58 INFO]: Loaded 441 spawn chunks for world world [03:00:58 INFO]: Time elapsed: 1598 ms [03:00:58 INFO]: Preparing start region for dimension 'world_nether'/minecraft:the_nether [03:00:58 INFO]: Preparing spawn area: 0% [03:00:58 INFO]: Preparing spawn area: 100% [03:00:59 INFO]: Preparing spawn area: 100% [03:00:59 INFO]: Preparing spawn area: 100% [03:01:00 INFO]: Preparing spawn area: 100% [03:01:00 INFO]: Loaded 441 spawn chunks for world world_nether [03:01:00 INFO]: Time elapsed: 2210 ms [03:01:00 INFO]: Preparing start region for dimension 'world_the_end'/minecraft:the_end [03:01:00 INFO]: Preparing spawn area: 0% [03:01:00 INFO]: Preparing spawn area: 100% [03:01:01 INFO]: Loaded 441 spawn chunks for world world_the_end [03:01:01 INFO]: Time elapsed: 852 ms [03:01:01 INFO]: [dynmap] Enabling dynmap v3.0-beta-10-257 [03:01:01 INFO]: [dynmap] Using Bukkit Permissions (superperms) for access control [03:01:01 INFO]: [dynmap] Web interface permissions only available for online users [03:01:01 INFO]: [dynmap] Mod Support processing completed [03:01:01 INFO]: [dynmap] Loaded 25 shaders. [03:01:01 INFO]: [dynmap] Loaded 82 perspectives. [03:01:01 INFO]: [dynmap] Loaded 14 lightings. [03:01:02 INFO]: [dynmap] Web server started on address 0.0.0.0:8000 [03:01:02 INFO]: [dynmap] version 3.0-beta-10-257 is enabled - core version 3.0-beta-10-257 [03:01:02 INFO]: [dynmap] For support, visit https://forums.dynmap.us [03:01:02 INFO]: [dynmap] To report or track bugs, visit https://github.com/webbukkit/dynmap/issues [03:01:02 INFO]: [dynmap] Loaded 3 maps of world 'world'. [03:01:02 INFO]: [dynmap] Loaded 2 maps of world 'world_nether'. [03:01:02 INFO]: [dynmap] Loaded 2 maps of world 'world_the_end'. [03:01:02 INFO]: [dynmap] Enabled [03:01:02 INFO]: [SkinsRestorer] Enabling SkinsRestorer v13.7.5 [03:01:02 INFO]: [SkinsRestorer] Detected Minecraft v1_15_R1, using UniversalSkinFactory. [03:01:02 INFO]: [SkinsRestorer] [ACF] Enabled Asynchronous Tab Completion Support! [03:01:02 INFO]: [Skript] Enabling Skript v2.4.1 [03:01:03 INFO]: [Skript] You're currently running the latest stable version of Skript. [03:01:06 INFO]: [Skript] Loaded 114752 aliases in 3571ms [03:01:06 INFO]: [Skript] ~ created by & © Peter Güttinger aka Njol ~ [03:01:06 INFO]: [Multiverse-Core] Enabling Multiverse-Core v4.1.0-b775 [03:01:06 WARN]: [Multiverse-Core] "Multiverse-Core v4.1.0-b775" has registered a listener for org.bukkit.event.entity.EntityCreatePortalEvent on method "public void com.onarandombox.MultiverseCore.listeners.MVPortalListener.entityPortalCreate(org.bukkit.event.entity.EntityCreatePortalEvent)", but the event is Deprecated. "Server performance will be affected"; please notify the authors [Rigby, fernferret, lithium3141, main--, dumptruckman]. [03:01:06 INFO]: [Multiverse-Core] We are aware of the warning about the deprecated event. There is no alternative that allows us to do what we need to do. The performance impact is negligible. [03:01:06 INFO]: [Multiverse-Core] 3 - World(s) loaded. 03:01:07 INFO: [Multiverse-Core] Version 4.1.0-b775 (API v24) Enabled - By Rigby, fernferret, lithium3141, main-- and dumptruckman 03:01:07 INFO: [Multiverse-Core] Help dumptruckman keep this project alive. Become a patron! https://www.patreon.com/dumptruckman 03:01:07 INFO: [Multiverse-Core] One time donations are also appreciated: https://www.paypal.me/dumptruckman 03:01:07 INFO: [skript-db] Enabling skript-db v0.2.1 03:01:07 INFO: [Skript-Paper] Enabling Skript-Paper v1.3.0 03:01:07 INFO: [Skript-Paper] Successfully enabled

03:01:07 INFO: Timings Reset 03:01:07 INFO: [Skript] Loading variables... 03:01:07 INFO: [Skript] Loaded 25 variables in 0.0 seconds 03:01:07 INFO: [SkinsRestorer] ---------------------------------------------- 03:01:07 INFO: [SkinsRestorer] +===============+ 03:01:07 INFO: [SkinsRestorer] | SkinsRestorer | 03:01:07 INFO: [SkinsRestorer] +===============+ 03:01:07 INFO: [SkinsRestorer] ---------------------------------------------- 03:01:07 INFO: [SkinsRestorer] Current version: 13.7.5 03:01:07 INFO: [SkinsRestorer] This is the latest version! 03:01:07 INFO: [SkinsRestorer] ---------------------------------------------- 03:01:07 INFO: [Skript] Loaded 14 scripts with a total of 5 triggers and 9 commands in 0.41 seconds 03:01:07 INFO: [Skript] Finished loading.