表工作详情
按给定条件$sql = "select * from work_details WHERE twd= '". $id."'";
加载到listView中//假设$ id等于1。
点击listView
后,它会显示其ID。但没有显示任何价值。
listViewUpdate.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> listView, View view,
int position, long id) {
mClickedPosition = position;
HashMap<String, String> clickedItem = EditDetails.get(position);
iD=clickedItem.get(Config.TAG_ID);
Toast.makeText(getActivity(),iD,Toast.LENGTH_LONG).show();
// Toast.makeText(getActivity(), iD + "", Toast.LENGTH_LONG).show();
}
});
答案 0 :(得分:0)
将SQL查询更改为:
$sql = "SELECT * FROM work_details WHERE twd='$id'";