important bugfix
This commit is contained in:
parent
117b9317cf
commit
f9d1493a5a
@ -147,7 +147,7 @@ public class MySQLConnection {
|
|||||||
* @return ResultSet
|
* @return ResultSet
|
||||||
*/
|
*/
|
||||||
public ResultSet getResultSet(String query, Object... params) {
|
public ResultSet getResultSet(String query, Object... params) {
|
||||||
query = (tablePrefix.isEmpty()) ? "" : query.replace((tablePrefixVariable.isEmpty()) ? "$tp" : tablePrefixVariable, tablePrefix);
|
query = (tablePrefix.isEmpty()) ? query : query.replace((tablePrefixVariable.isEmpty()) ? "$tp" : tablePrefixVariable, tablePrefix);
|
||||||
try { int start = 1;
|
try { int start = 1;
|
||||||
PreparedStatement ps = con.prepareStatement(query);
|
PreparedStatement ps = con.prepareStatement(query);
|
||||||
for (Object current : params) { ps.setObject(start, current);start++; }
|
for (Object current : params) { ps.setObject(start, current);start++; }
|
||||||
@ -175,7 +175,7 @@ public class MySQLConnection {
|
|||||||
* @return this class
|
* @return this class
|
||||||
*/
|
*/
|
||||||
public MySQLConnection update(String query, Object... params) {
|
public MySQLConnection update(String query, Object... params) {
|
||||||
query = (tablePrefix.isEmpty()) ? "" : query.replace((tablePrefixVariable.isEmpty()) ? "$tp" : tablePrefixVariable, tablePrefix);
|
query = (tablePrefix.isEmpty()) ? query : query.replace((tablePrefixVariable.isEmpty()) ? "$tp" : tablePrefixVariable, tablePrefix);
|
||||||
try { int start = 1;
|
try { int start = 1;
|
||||||
PreparedStatement ps = con.prepareStatement(query);
|
PreparedStatement ps = con.prepareStatement(query);
|
||||||
for (Object current : params) { ps.setObject(start, current);start++; }
|
for (Object current : params) { ps.setObject(start, current);start++; }
|
||||||
|
Reference in New Issue
Block a user