Welcome Guest, Not a member yet? Register   Sign In
NEED HELP ABOUT count_all_results()
#1

[eluser]erviando[/eluser]
i want show result of count from model to view

but there is a notice "Message: Array to string conversion"

please help me...

thanks before...


Model:
function get_all_topikdo_jumlah()
{
$this->db->select('topik_pembimbing1');
$this->db->select('topik_pembimbing2');
$this->db->count_all_results('topik');


$this->db->from('topik');
$this->db->from('dosen');
$this->db->where('dosen_id','topik_pembimbing1');
$this->db->or_where('dosen_id','topik_pembimbing2');
$data=$this->db->get();
return $data->result();
}


Controller:
$data['jumlah'] = $this->topikdo_model->get_all_topikdo_jumlah();


View:
<?php

$no=1;
foreach($daftardosen as $row)
{
?>
<tr>
<td>&lt;?php echo $row->dosen_id;?&gt;</td>
<td>&lt;?php echo $row->dosen_nama;?&gt;</td>
<td>&lt;?php echo $jumlah;?&gt;</td>
</tr>
&lt;?php $no++;
}
?&gt;


Messages In This Thread
NEED HELP ABOUT count_all_results() - by El Forum - 03-12-2013, 08:35 AM
NEED HELP ABOUT count_all_results() - by El Forum - 03-12-2013, 10:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB