import: java.lang.Object gyurix.mysql.MySQLDatabase java.lang.String expression [sqlsk ]mysql ([database|data base|db]) with [data] %text%: get: set {_data} to expr-1 set {_d::*} to {_data} split at ";" set {_sql} to new MySQLDatabase({_d::1}, {_d::2}, {_d::3}, {_d::4}) {_sql}.getConnection() if {_sql}.openConnection() is true: return {_sql} else: send "&4[SQLSK] &cDatabase error (Host:%{_d::1}%)" to console stop effect [sqlsk ]mysql %object% query %text%: trigger: set {_q} to expr-2 set {_db} to expr-1 {_db}.getConnection() if {_db}.openConnection() is true: {_db}.command({_q}) {_db}.close() else: send "&4[SQLSK] &cDatabase error (Host:%{_d::1}%)" to console stop expression [sqlsk ]mysql %object% query %text% and get [string] %text%: get: set {_q} to expr-2 set {_db} to expr-1 set {_s} to expr-3 {_db}.getConnection() if {_db}.openConnection() is true: set {_rs} to {_db}.query({_q}) while {_rs}.next(): add {_rs}.getString({_s}) to {_out::*} return {_out::*} {_db}.close() stop else: send "&4[SQLSK] &cDatabase error (Host:%{_d::1}%)" to console stop