Buongiorno a tutti.
Ho due queries: la prima mi trova dal un campo l'id del record.
La seconda con l'id precedentemente trovato mi prende tutti i records che mi interessano.
purtroppo è da due settimane che non ne arrivo a capo vengono generare in ordine invertite
quindi non funziona niente.
Sono certo che sia un mio errore, ma ... dove sbaglio?
Grazie a tutti di aver letto.
allego il log ed il codice usato (B4A)
---------------------------------------------------------------------------------------------------------------
Logger connesso a: 4ff44eb7
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
BV5900:66:05:46:00:00:40
EM2-002:34:81:F4:79:1B:07
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
EM2-002:34:81:F4:79:1B:07
BV5900:66:05:46:00:00:40
sendString: A1
sendString: A2
*** Service (httputils2service) Create ***
(Http client initialized with accept all option.)
** Service (httputils2service) Start **
** Service (httputils2service) Start **
SQL ------ ID:fql
SQL ------ ID:uid
----------------------------------------------------------------------------------------------------------------------
Ho due queries: la prima mi trova dal un campo l'id del record.
La seconda con l'id precedentemente trovato mi prende tutti i records che mi interessano.
purtroppo è da due settimane che non ne arrivo a capo vengono generare in ordine invertite
quindi non funziona niente.
Sono certo che sia un mio errore, ma ... dove sbaglio?
Grazie a tutti di aver letto.
allego il log ed il codice usato (B4A)
---------------------------------------------------------------------------------------------------------------
Logger connesso a: 4ff44eb7
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
BV5900:66:05:46:00:00:40
EM2-002:34:81:F4:79:1B:07
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
EM2-002:34:81:F4:79:1B:07
BV5900:66:05:46:00:00:40
sendString: A1
sendString: A2
*** Service (httputils2service) Create ***
(Http client initialized with accept all option.)
** Service (httputils2service) Start **
** Service (httputils2service) Start **
SQL ------ ID:fql
SQL ------ ID:uid
----------------------------------------------------------------------------------------------------------------------
queries:
Sub JobDone (Job As HttpJob)
End Sub
Sub getUserID(res As String) As Int
Dim lines() As String = Regex.Split(CRLF,res)
Dim items() As String = Regex.split(";",lines(1))
uid = items(0)
Return uid
End Sub
Sub UserCF2ID(cf As String) As Int
uid = 0
Post("SELECT users.* FROM users WHERE users.CF = "&cf,"uid")
End Sub
Sub httpPost(path As String, SQL As String,id As String)
Dim j As HttpJob
j.Initialize("", Me)
j.PostString(path,SQL)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
refresh(id,j.GetString)
End If
j.Release
End Sub
Sub refresh(id As String,res As String)
Log("SQL ------ ID:"&id)
Select(id)
Case "fql": populate(res)
Case "uid": getUserID(res)
Case Else Log("errore:"&id)
End Select
End Sub
Sub Post(sql As String,id As String)
httpPost(URL&"sql.php","q="& sql,id)
End Sub
Sub selFreqsUID(cf As String)
Dim s As String
Post("SELECT users.* FROM users WHERE users.CF = "&cf,"uid")
s = "SELECT fsource.*,fusers.*, users.* FROM fsource, fusers, users WHERE users.CF = "&cf
s = s&" and users.id = fusers.lev group by fid order by Titolo"
' s = s&" and fsource.id = fusers.fid group by fid order by Titolo"
Post(s,"fql")
End Sub