X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/160155e6ecbe7b7071a1ac0b71a6a5bd2c9522af..8ae4f08661d7b324d5cd7aa16ab1a7b2810d94f2:/src/common/dbtable.cpp diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 41d19a4d8c..bfa0dd10c8 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -1070,7 +1070,7 @@ void wxDbTable::BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool disti { tStr = colDefs[i].ColName; // If joining tables, the base table column names must be qualified to avoid ambiguity - if ((appendFromClause || pDb->Dbms() == dbmsACCESS) && !tStr.Find(wxT('.'))) + if ((appendFromClause || pDb->Dbms() == dbmsACCESS) && tStr.Find(wxT('.')) == wxNOT_FOUND) { pSqlStmt += pDb->SQLTableName(queryTableName.c_str()); pSqlStmt += wxT("."); @@ -1283,7 +1283,7 @@ void wxDbTable::BuildWhereClause(wxString &pWhereClause, int typeOfWhere, // Concatenate where phrase for the column wxString tStr = colDefs[colNo].ColName; - if (qualTableName.Length() && !tStr.Find(wxT('.'))) + if (qualTableName.Length() && tStr.Find(wxT('.')) == wxNOT_FOUND) { pWhereClause += pDb->SQLTableName(qualTableName); pWhereClause += wxT(".");