summaryrefslogtreecommitdiff
path: root/src/dalstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r--src/dalstorage.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp
index eeb6249d..fc168925 100644
--- a/src/dalstorage.cpp
+++ b/src/dalstorage.cpp
@@ -491,13 +491,14 @@ DALStorage::getMapNameFromId(const unsigned int mapId)
open();
try {
- std::string sql("select map from ");
- sql += MAPS_TBL_NAME;
- sql += " where id = '";
- sql += mapId;
- sql += "');";
-
- const dal::RecordSet& mapInfo = mDb->execSql(sql);
+ std::stringstream sql;
+ sql << "select map from ";
+ sql << MAPS_TBL_NAME;
+ sql << " where id = ";
+ sql << mapId;
+ sql << ";";
+
+ const dal::RecordSet& mapInfo = mDb->execSql(sql.str());
// If the map return is empty then we have no choice but to return false.
if (mapInfo.isEmpty()) {