Skip to content
Snippets Groups Projects
Unverified Commit 817c94ed authored by mInT's avatar mInT Committed by GitHub
Browse files

Update README.md

parent 903ec62b
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ private void testQuery() { ...@@ -86,7 +86,7 @@ private void testQuery() {
```java ```java
public int testQueryResult(final String value) { public int testQueryResult(final String value) {
try { try {
final CachedRowSet resultSet = this.asyncMySQLPoolHandler.removeSQLInjectionPossibility("SELECT `yourColumn` FROM `" + "yourTable" + "` WHERE `yourValue`= '" + this.asyncMySQLPoolHandler.removeSQLInjectionPossibility(value) + "';").join(); final CachedRowSet resultSet = this.asyncMySQLPoolHandler.executeQueryAsync("SELECT `yourColumn` FROM `" + "yourTable" + "` WHERE `yourValue`= '" + this.asyncMySQLPoolHandler.removeSQLInjectionPossibility(value) + "';").join();
if (resultSet.last()) { if (resultSet.last()) {
final int test = resultSet.getInt("yourColumn"); final int test = resultSet.getInt("yourColumn");
resultSet.close(); resultSet.close();
...@@ -107,7 +107,7 @@ public int testQueryResult(final String value) { ...@@ -107,7 +107,7 @@ public int testQueryResult(final String value) {
```java ```java
public int test(final String value) { public int test(final String value) {
final Integer result = (Integer) this.asyncMySQLPoolHandler.removeSQLInjectionPossibility("SELECT `yourColumn` FROM `" + "yourTable" + "` WHERE `yourValue`= '" + this.asyncMySQLPoolHandler.removeSQLInjectionPossibility(value) + "';" , "yourColumn").join(); final Integer result = (Integer) this.asyncMySQLPoolHandler.executeQueryInstantLastResultAsync("SELECT `yourColumn` FROM `" + "yourTable" + "` WHERE `yourValue`= '" + this.asyncMySQLPoolHandler.removeSQLInjectionPossibility(value) + "';" , "yourColumn").join();
return result != null ? result : -1; return result != null ? result : -1;
} }
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment