Using parameterized query and string literals and also an alias for the table name:
B4X:
Dim RS2 As ResultSet=SQL.ExecQuery2($"SELECT K.id, K.catid, K.name FROM kala K WHERE K.name LIKE ? OR K.id =?"$ , Array As Object($"%${stext}%"$ , text))
I know it's an extra line, but it sure makes debugging easier if you gather the SQL query into a string first so that you can see what SQLite is seeing eg:
B4X:
Dim Query As String = $"SELECT kala.id, kala.catid, kala.name WHERE kala.name LIKE '%${stext}%' OR kala.id = ${text}"$
Log(Query)
Dim RS2 As ResultSet = Main.Sql1.ExecQuery(Query)
Just fyi this is the incorrect approach. You should use parametized queries (with ? And array of strings) doing it differently just make it more complex and insecure
Just fyi this is the incorrect approach. You should use parametized queries (with ? And array of strings) doing it differently just make it more complex and insecure
Using parameterized query and string literals and also an alias for the table name:
B4X:
Dim RS2 As ResultSet=SQL.ExecQuery2($"SELECT K.id, K.catid, K.name FROM kala K WHERE K.name LIKE ? OR K.id =?"$ , Array As Object($"%${stext}%"$ , text))