|
$query=$this->admin_model->show();
if($query->num_rows>0)
{
echo $this->table->set_heading('会议名称','会议地点','会议时间','会议人员');
foreach($query->result() as $row)//遍历
{
$edit=anchor(site_url('admin/edit/',$data['message_id']=$row->id),'编辑');
$this->session->set_userdata($data);
$delete=anchor(site_url('admin/delete/',$row->id),'删除');
$this->table->add_row($row->name,$row->address,$row->time,$row->participants,$edit,$delete);
}
echo $this->table->generate();//输出一个表格
重点在删除那,点击了删除之后,自动跳转到admin/delete
public function delete()
{
$this->load->model('admin_model');
$this->admin_model->delete('message',$this->uri->segment(3));
可是$row->id没有传过来
}
|
|