Android Question sql.select_animal=SELECT name, image, id FROM animals WHERE id = ? and name =?

guandjy

Member
How to change to multi condition query:
Sub GetRecord (id As Int)
   Dim req As DBRequestManager = CreateRequest
   Dim cmd As DBCommand = CreateCommand("select_animal", Array(id))
   Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
   If j.Success Then
       req.HandleJobAsync(j, "req")
       Wait For (req) req_Result(res As DBResult)
       'work with result
       req.PrintTable(res)
   Else
       Log("ERROR: " & j.ErrorMessage)
   End If
   j.Release
End Sub
 

guandjy

Member
Thank you. It's settled. Just change it to this
B4X:
Dim cmd As DBCommand = CreateCommand("select_denglu", Array(EditText1.text,EditText2.text))
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
How to change to multi condition query:
The answer is is in the below thread post #2
 
Upvote 0
Top