Welcome Guest, Not a member yet? Register   Sign In
call to undefined function
#3

[eluser]suku[/eluser]
<?php
class Price extends CI_Controller {

public function __construct()
{
parent::__construct();

$this->load->helper('url');
// Your own constructor code
}
function index()
{
echo 'hello';
}
function display_view()
{
$this->load->view('price/view');
}

function edit($id)
{
$this->output->enable_profiler(TRUE);
$price=$this->input->post('price');
$data=array(

'fld_price'=>$price
);

$this->load->model('price_model');
$this->price_model->edit($data);

}

function insert()
{


$price=$this->input->post('price');
$id=$this->input->post('hdId');

$data = array('fld_id'=>$id,

'fld_price'=>$price
);

$this->load->model('price_model');
$this->price_model->insert($data);
//$this->load->select();
}
function select()
{

$this->load->model('price_model');
$data['rows']=$this->price_model->select();
$this->load->view('price/view',$data);

}
function delete($id)
{
//print_r($id);
$this->load->model('price_model');
$this->price_model->delete($id);
}
function update($id)
{
$price=$this->input->post('price');
print_r($id);
$data = array(

'fld_price'=>$price
);
print_r($id);

$this->load->model('price_model');
$this->price_model->update($id,$price);
/* $this->load->view('price/view',$data);*/


}

}
?>

<?php
class Price_model extends CI_Model
{

function __construct()
{
// Call the Model constructor
parent::__construct();
}
function insert($data)
{
$this->db->insert('tbl_price',$data);
}
function select()
{
$query = $this->db->get('tbl_price');
return $query;

}
function delete($id)
{
$this->db->where('fld_id', $id);
$this->db->delete('tbl_price');


}
function edit($data)
{

$this->db->set('fld_price',$price);
$this->db->where('fld_id', $id);
$this->db->insert('tbl_price');

}

}


Messages In This Thread
call to undefined function - by El Forum - 05-15-2012, 09:20 PM
call to undefined function - by El Forum - 05-15-2012, 09:34 PM
call to undefined function - by El Forum - 05-16-2012, 12:34 AM
call to undefined function - by El Forum - 05-16-2012, 12:49 AM
call to undefined function - by El Forum - 05-16-2012, 10:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB