Fixed critical bug in ConditionCompiler (MySQLConnector)

main
Inga 🏳‍🌈 14 years ago
parent f4c3d319d2
commit dca8ed5ff8
  1. 2
      MySQLConnector/ConditionCompiler.cs
  2. 7
      MySQLConnector/Connection.cs

@ -56,7 +56,7 @@ namespace FLocal.MySQLConnector {
private string CompileCondition(MultiValueCondition condition) {
List<string> valueParams = new List<string>();
foreach(string value in condition.values) {
valueParams.Add(this.paramsholder.Add(value));
valueParams.Add(this.traits.markParam(this.paramsholder.Add(value)));
}
if(condition.inclusive) {

@ -120,7 +120,12 @@ namespace FLocal.MySQLConnector {
}
command.CommandText = "SELECT COUNT(*) " + queryMain;
object rawCount = command.ExecuteScalar();
object rawCount;
//try {
rawCount = command.ExecuteScalar();
//} catch(Npgsql.NpgsqlException e) {
//throw new FLocalException("Error while trying to execute " + command.CommandText + ": " + e.Message);
//}
long count = (long)rawCount;
if(count < 1) {
diapasone.total = 0;

Loading…
Cancel
Save