I have a database that has Arabic words, so the text is unicode utf-8 encoded. I want to search for a word in all columns.
I read a specific word from the database, and then search the same word. If I search on one column I get a result. If I search on multiple columns, I don't get the result. What is wrong with my search query for multiple columns?
I read a specific word from the database, and then search the same word. If I search on one column I get a result. If I search on multiple columns, I don't get the result. What is wrong with my search query for multiple columns?
B4X:
Dim tag2 As String
Dim c As Cursor
c = sql1.ExecQuery("SELECT * FROM Verses")
c.Position = 5 'set to row 5
tag2 = c.GetString("F1") 'gets the word stored in Column F1, row 5
'now search the same word obtained from the database
c = sql1.ExecQuery($"Select * FROM Verses WHERE ((F1+F2) LIKE '%${tag2}%')"$) 'this query does not work
log (c.RowCount) ' gives 0
c = sql1.ExecQuery($"Select * FROM Verses WHERE ((F1) LIKE '%${tag2}%')"$) 'this query works
log (c.RowCount) ' gives 1