Allow quote (') in search

This commit is contained in:
SJLennon
2023-12-04 15:45:54 -05:00
parent b76971e117
commit 523c327a36
+4 -3
View File
@@ -633,8 +633,8 @@
from CUSTMAST + from CUSTMAST +
where NAME LIKE ? + where NAME LIKE ? +
and CITY like ? '; and CITY like ? ';
wkName = Sanatize(%trim(SC_NAME) + '%') ; wkName = %trim(SC_NAME) + '%';
wkCity = Sanatize(%trim(SC_CITY) + '%'); wkCity = %trim(SC_CITY) + '%';
if SC_STATE <> ' '; if SC_STATE <> ' ';
if %len(%trim(SC_STATE)) <> 2; if %len(%trim(SC_STATE)) <> 2;
@@ -765,7 +765,8 @@
p e p e
//============================================================= //=============================================================
// === Sanatize =============================================== // === Sanatize ===============================================
// Sanatize an entered search string field. // Sanatize an entered search string field that is not using
// parameter markers.
// - Remove any single quotes, otherwise the built SQL prepare // - Remove any single quotes, otherwise the built SQL prepare
// will fail. // will fail.
// Double quotes are OK. // Double quotes are OK.