Don't use limit with sqlite. Fixes #89
Gives a strange error when using limit with sqlite.
This commit is contained in:
parent
44ce2c7cfe
commit
890923fca7
@ -1128,6 +1128,19 @@ public class JailIO {
|
|||||||
|
|
||||||
switch(storage) {
|
switch(storage) {
|
||||||
case 1:
|
case 1:
|
||||||
|
try {
|
||||||
|
PreparedStatement p = getConnection().prepareStatement("delete from `" + prefix + "cells` where name = ? and jail = ?;");
|
||||||
|
p.setString(1, c.getName());
|
||||||
|
p.setString(2, j.getName());
|
||||||
|
|
||||||
|
p.executeUpdate();
|
||||||
|
p.close();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
pl.getLogger().severe("---------- Jail Error!!! ----------");
|
||||||
|
pl.getLogger().severe("Error while removing the cell '" + c.getName() + "' from the Jail '" + j.getName() + "', please check the error and fix what is wrong.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
try {
|
try {
|
||||||
PreparedStatement p = getConnection().prepareStatement("delete from `" + prefix + "cells` where name = ? and jail = ? limit 1;");
|
PreparedStatement p = getConnection().prepareStatement("delete from `" + prefix + "cells` where name = ? and jail = ? limit 1;");
|
||||||
|
Loading…
Reference in New Issue
Block a user