sql select

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Pergasik

Member
Feb 5, 2025
1
0
1
Code:
[00:31:37 WARN]: java.sql.SQLException: Operation not allowed after ResultSet closed
[00:31:37 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
[00:31:37 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[00:31:37 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:81)
[00:31:37 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:55)
[00:31:37 WARN]:        at com.mysql.cj.jdbc.result.ResultSetImpl.checkClosed(ResultSetImpl.java:472)
[00:31:37 WARN]:        at com.mysql.cj.jdbc.result.ResultSetImpl.next(ResultSetImpl.java:1719)
[00:31:37 WARN]:        at SkQuery-4.2.0 (1).jar//com.w00tmast3r.skquery.elements.expressions.ExprSQLQueryObjects.get(ExprSQLQueryObjects.java:35)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:78)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:262)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.lang.Effect.run(Effect.java:32)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:40)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:67)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:33)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:333)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:292)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:303)
[00:31:37 WARN]:        at Skript-2.10.0 (1).jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:238)
[00:31:37 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[00:31:37 WARN]:        at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91)
[00:31:37 WARN]:        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[00:31:37 WARN]:        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30)
[00:31:37 WARN]:        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13)
[00:31:37 WARN]:        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8)
[00:31:37 WARN]:        at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5)
[00:31:37 WARN]:        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103)
[00:31:37 WARN]:        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:451)
[00:31:37 WARN]:        at net.minecraft.commands.Commands.performCommand(Commands.java:358)
[00:31:37 WARN]:        at net.minecraft.commands.Commands.performCommand(Commands.java:345)
[00:31:37 WARN]:        at net.minecraft.commands.Commands.performCommand(Commands.java:340)
[00:31:37 WARN]:        at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2297)
[00:31:37 WARN]:        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$15(ServerGamePacketListenerImpl.java:2271)
[00:31:37 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[00:31:37 WARN]:        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
[00:31:37 WARN]:        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1581)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
[00:31:37 WARN]:        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1558)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1551)
[00:31:37 WARN]:        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1510)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1517)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1362)
[00:31:37 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333)
[00:31:37 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)


options:
Table: table

script options:
$ db url jdbc:mysql://localhost:3306/base
$ db username root
$ db password pass

command /ID <text>:
trigger:
set {_id} to arg-1
set {_query} to "SELECT ID FROM {@Table} WHERE ID = '%{_id}%'"
set {_NickResult::*} to objects in column "nick_mc" from result of query {_query}
send "&7[DEBUG] SQL: %{_query}%" to console
send "&7[DEBUG] RESULT: %{_NickResult::*}%" to console

[DEBUG] SQL: SELECTID nick_mc FROM linked_accounts WHERE ID = '3'
[DEBUG] RESULT <none>