我正在尝试从服务器获取用户在 ListView 中放置的订单,但我总是在这里得到NULL POINTER EXCEPTION:- tName.setText(strName);
要求:
我想在 ListView 中获取所有这些订单
日志状态:
05-23 09:41:05.684: D/CartAdapter(784): MemberID:: 1
05-23 09:41:05.953: D/CartAdapter(784): strMemberID 37
05-23 09:41:05.953: D/CartAdapter(784): strName Samosa(2)(Rs.3.75),Vegetable Pakora(3)(Rs.3.75),Veggie(1)(Rs.5.25),Daal Soup(4)(Rs.3.25),
05-23 09:41:05.953: D/AndroidRuntime(784): Shutting down VM
05-23 09:41:06.034: E/AndroidRuntime(784): Caused by: java.lang.NullPointerException
05-23 09:41:06.034: E/AndroidRuntime(784): at OrdersActivity.showInfo(OrdersActivity.java:91)
在 PHP 中,我使用以下查询来获取记录:
$strSQL = "SELECT * FROM order_details WHERE 1 AND MemberID = '".$strMemberID."' ";