Hello,
ı am using connecting android to mysql database tutorial. I tried a code like this but i am having a problem.:
in a sub i use:
ExecuteRemoteQuery("SELECT * FROM user1 WHERE username='" & txtusername.text & "'", LF1)
then under jobdone / case LF1 I use a for next like this:
then the code goes to LF2 under jobdone and it updates the rows with the previous for next
but it only updates the first one. I doubt because i use select again in CASE LF1 section , the first select is not recognized anymore and thats why it only updates the first item only. it doesnt update the next ones.
But i am not sure . Can you tell me what is the reason for this ?
ı am using connecting android to mysql database tutorial. I tried a code like this but i am having a problem.:
in a sub i use:
ExecuteRemoteQuery("SELECT * FROM user1 WHERE username='" & txtusername.text & "'", LF1)
then under jobdone / case LF1 I use a for next like this:
B4X:
Dim addlist9 As List
addlist9 = parser.NextArray 'returns a list with maps
For i = 0 To addlist9.Size - 1
Dim m As Map
m = addlist9.Get(i)
fromlf= m.Get("sok")
tolf=m.Get("sak")
ExecuteRemoteQuery("SELECT * FROM userroutes1 WHERE sok='"&tolf&"' and sak'"&fromlf&"' or sok='"&fromlf&"' and sak'"&tolf&"' ", LF2)
Next
but it only updates the first one. I doubt because i use select again in CASE LF1 section , the first select is not recognized anymore and thats why it only updates the first item only. it doesnt update the next ones.
But i am not sure . Can you tell me what is the reason for this ?