I wrote this code that queries an online database using the resumable SUb.
It works properly
Then I wanted to replace the variable Query with the string ... and doing so tells me error
Syntax error
Now I put the Query variable back on, but I'm wondering why.
It works properly
B4X:
Dim Query As String = $"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$
'Load from DB
Wait For (PHP.ReadMov(Query)) Complete (Lista As List)
Then I wanted to replace the variable Query with the string ... and doing so tells me error
B4X:
'Load from DB
Wait For (PHP.ReadMov($"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$)) Complete (Lista As List)
Now I put the Query variable back on, but I'm wondering why.