Hello, I have a problem trying to access a MySQL field Varchar (2000).
This is the code:
The field "introduction" is Varchar (2000) and the query returns null.
Other fields if they bring value.
Thanks
This is the code:
B4X:
sub FetchPublicationsList
'Gets all the available Publications
ExecuteRemoteQuery ("SELECT name, publication_id, image_url, publication_date, SUBSTRING (introduction, 1, 30) publication as ORDER BY FROM introduction publication_id" PUBLICATIONS_LIST)
End Sub
Sub ExecuteRemoteQuery(Query As String, TaskId As Int)
Dim req As HttpRequest
req.InitializePost2("http://www.midomain.pe/testing/cns.php", Query.GetBytes("UTF8"))
hc.Execute(req, TaskId)
End Sub
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
....
res = Response.GetString ("UTF8")
Dim parser As JSONParser
parser.Initialize (res)
Dim publications As List
publications = parser.NextArray
.....
For i = 0 To publications.Size - 1
Dim m As Map
m = publications.Get (i)
lblIntroduction = Pan (i). GetView (4) 'Is a label
lblIntroduction.Text = m.Get ("introduction") ' <<<------ The problem
...
End Sub
The field "introduction" is Varchar (2000) and the query returns null.
Other fields if they bring value.
Thanks