任何机构可以帮助我?我使用 MVC。这是我的模型代码:
function activatedNode($node_id){ //to activated selected node
$data = array (
'active' => 1
);
$this->db-> where ('node_id', "'.$node_id.'"); //here is error line
$this->db-> update ('node',$data);
}
这是我的控制器代码:
function resultRuang(){
$ruang = $this-> input -> post('ruang');
$node = $this->search3d -> ambilNodeID($ruang);
$this->search3d -> nonactivatedNode();
$this->search3d -> activatedNode($node);
$data['ruang'] = $this->search3d-> resultRuang ();
$data['menu_aktif']= 'ruang';
$data['halaman']= "halaman/resultRuang";
$this->load->view('template/search_view',$data);
}
这是查看代码:
<?php
echo form_open('mainSearch/resultRuang');
echo 'Ruang yang dipilih :';
echo $ruang -> node_id; //this is also error
echo '<a href= "'.base_url().'index.php/mainSearch/searchRuang"> <button name="name" type="button">Back</button></a>';
echo form_close();
?>