Fetching data from Mysql DB to listView using JSON and PHP

前端 未结 1 1843
暖寄归人
暖寄归人 2021-01-03 00:31

I am trying to fetch data from mysql DB in android listview. But somehow I am not been able to display the data in the listView

I was trying this with the help of a

相关标签:
1条回答
  • 2021-01-03 01:10

    Change this

     String name = jsonChildNode.optString("employee_name");
     String number = jsonChildNode.optString("employee_no");
    

    to

     String name = jsonChildNode.getString("emp_name");
     String number = jsonChildNode.getString("emp_no");
    
    0 讨论(0)
提交回复
热议问题