mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Optimized SELECT creation in RetroDb::sqlQuery
This commit is contained in:
parent
ab538c6d28
commit
b8edb75895
1 changed files with 4 additions and 5 deletions
|
@ -183,12 +183,11 @@ RetroCursor* RetroDb::sqlQuery(const std::string& tableName, const std::list<std
|
|||
std::list<std::string>::const_iterator it = columns.begin();
|
||||
|
||||
for(; it != columns.end(); ++it){
|
||||
columnSelection += *it;
|
||||
|
||||
++it;
|
||||
if(it != columns.end())
|
||||
if (it != columns.begin()) {
|
||||
columnSelection += ",";
|
||||
--it;
|
||||
}
|
||||
|
||||
columnSelection += *it;
|
||||
}
|
||||
|
||||
// construct query
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue