mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralfms.git
synced 2026-01-27 10:23:12 +00:00
Fixing DB Range problems.
This commit is contained in:
@@ -138,7 +138,7 @@ namespace uCentral {
|
||||
|
||||
DevicesRecordList Records;
|
||||
|
||||
std::string St{"select " + DBFIELDS_DEVICES_SELECT + " from " + DBNAME_DEVICES + " ORDER BY SerialNumber "};
|
||||
std::string St{"select " + DBFIELDS_DEVICES_SELECT + " from " + DBNAME_DEVICES + " ORDER BY SerialNumber ASC "};
|
||||
Select << ConvertParams(St) + ComputeRange(From, HowMany),
|
||||
Poco::Data::Keywords::into(Records);
|
||||
Select.execute();
|
||||
|
||||
@@ -246,11 +246,11 @@ namespace uCentral {
|
||||
std::string st;
|
||||
|
||||
if(Compatible.empty()) {
|
||||
st = "SELECT " + DBFIELDS_FIRMWARES_SELECT + " FROM " + DBNAME_FIRMWARES + " ORDER BY Id ";
|
||||
st = "SELECT " + DBFIELDS_FIRMWARES_SELECT + " FROM " + DBNAME_FIRMWARES + " ORDER BY Id ASC ";
|
||||
Select << ConvertParams(st) + ComputeRange(From, HowMany),
|
||||
Poco::Data::Keywords::into(Records);
|
||||
} else {
|
||||
st = "SELECT " + DBFIELDS_FIRMWARES_SELECT + " FROM " + DBNAME_FIRMWARES + " where DeviceType=? ORDER BY Id ";
|
||||
st = "SELECT " + DBFIELDS_FIRMWARES_SELECT + " FROM " + DBNAME_FIRMWARES + " where DeviceType=? ORDER BY Id ASC ";
|
||||
Select << ConvertParams(st) + ComputeRange(From, HowMany),
|
||||
Poco::Data::Keywords::into(Records),
|
||||
Poco::Data::Keywords::use(Compatible);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace uCentral {
|
||||
Poco::Data::Statement Select(Sess);
|
||||
|
||||
std::string st{"SELECT " + DBFIELDS_HISTORY_SELECT +
|
||||
" FROM " + DBNAME_HISTORY + " where SerialNumber=? ORDER BY Upgraded " };
|
||||
" FROM " + DBNAME_HISTORY + " where SerialNumber=? ORDER BY Upgraded DESC " };
|
||||
|
||||
Select << ConvertParams(st) + ComputeRange(From, HowMany),
|
||||
Poco::Data::Keywords::into(Records),
|
||||
|
||||
Reference in New Issue
Block a user