Placeholder for working with MySQL
A placeholder that allows you to working with MySQL and other external databases.
Meaning
Allows you to working with MySQL and other external databases, using the JDBC link for the connection and performing different queries using PreparedStatement (default queries are suitable too).
Format
%CEP_mysql_<jdbc_url>_<sql_query>_(semi-mandatory) <param1>,<param2>,<paramN>%
<jdbc_url> – the JDBC link to connect to the database; (MANDATORY)
<sql_query> – the query to the database (only obtaining the data); (MANDATORY)
<params> – the substitutes for the "?" in the PreparedStatements in the "sql_query" (use it only in case if you are using the PreparedStatements in the "sql_query"). (SEMI-MANDATORY)
Use "ᵕ" symbol instead of underscores and "╵" symbol instead of percents everywhere!
Not only PreparedStatements are available, default queries are suitable too.
Examples
%CEP_mysql_jdbc:mysql://u256340ᵕPIuNdnjIDAD:0gwDfoEdN╵44ySggXPCF╵2B56uFLpC39za╵5E@mysql-org-d1.test.xyz:3306/s263450ᵕTESTDB_SELECT * FROM TestTable WHERE Player = ? AND Action = ? ORDER BY ID DESC LIMIT ?_0ptifyne,ObtainingMoney,3% # Get three last entries from the TestTable with player "0ptifyne" and action "ObtainingMoney"
Note that any external databases are suitable, not just MySQL.
Last updated