Fix a bug in search engine
This commit is contained in:
parent
63ccfc7f97
commit
0dc15fdb7b
|
@ -1291,7 +1291,8 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||||
req += wxT("(");
|
req += wxT("(");
|
||||||
req += wxT("year >= ") + yearFrom ;
|
req += wxT("year >= ") + yearFrom ;
|
||||||
req += wxT(" AND (month > '") + monthFrom + wxT("' OR (month == '") + monthFrom + wxT("' AND day >= '") + dayFrom + wxT("'))");
|
req += wxT(" AND (month > '") + monthFrom + wxT("' OR (month == '") + monthFrom + wxT("' AND day >= '") + dayFrom + wxT("')");
|
||||||
|
req += wxT(" OR (month < '") + monthFrom + wxT("' AND year > '") + yearFrom + wxT("'))");
|
||||||
req += wxT(")");
|
req += wxT(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1300,7 +1301,8 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||||
req += wxT("(");
|
req += wxT("(");
|
||||||
req += wxT("year <= ") + yearTo ;
|
req += wxT("year <= ") + yearTo ;
|
||||||
req += wxT(" AND (month < '") + monthTo + wxT("' OR (month == '") + monthTo + wxT("' AND day <= '") + dayTo + wxT("'))");
|
req += wxT(" AND (month < '") + monthTo + wxT("' OR (month == '") + monthTo + wxT("' AND day <= '") + dayTo + wxT("')");
|
||||||
|
req += wxT(" OR (month > '") + monthTo + wxT("' AND year < '") + yearTo + wxT("'))");
|
||||||
req += wxT(")");
|
req += wxT(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user