Welcome Guest, Not a member yet? Register   Sign In
Call to a member function field_data() on a non-object in (plugin to excel)
#1

[eluser]Unknown[/eluser]
Hay guys...


I'm beginner in using CI.. could you help me in this plugin to excel trouble.. I really don't way.. please help me..


here's my script

// Controller

function export()
{

$year_x= trim($this->input->post('year',TRUE));
$month_x= trim($this->input->post('c_month',TRUE));
$unit_x = trim($this->input->post('c_unit',TRUE));

$file_name = $bulan_x.''.$tahun_x;
$query = $this->mod_export->export_data($unit_x,$year_x, $month_x);
to_excel($query, $file_name);


$this->session->set_flashdata('message','Has Already Verified');
redirect('export_pajak/export/','refresh');

}



//model


function export_data($unit_x,$year_x, $month_x)
{
$q="Select * from record_data where unit =" ."'$unit_x'". "AND year_Ok=" ."'$year_x'". "AND month_ok =" ."'$month_x'".;
$sql= $this->db->query("$q");
return $sql->num_rows();

}




Theme © iAndrew 2016 - Forum software by © MyBB