Welcome Guest, Not a member yet? Register   Sign In
Passing an Array from a Model to a Controller?
#11

[eluser]Solarpitch[/eluser]
Code:
$config['total_rows'] = '200';

Does this not have to be returned from the model somehow as its the num_rows() returned from the query?
#12

[eluser]xwero[/eluser]
The total_rows are fetched with a simple count model method
Code:
// model
function sales_count()
{
   return $this->db->count-all('sales');
}
// controller
$config['total_rows'] = '$this->report_model->sales_count();
#13

[eluser]therealmaloy[/eluser]
geeks

as i've said, what i've laid down is the idea, i never tried to perfect the code.. anyways the important thing now is that Solarpitch is well guided. Smile

i've just placed properly the code tidbits of Solarpitch into it's proper classes...

thanks everyone..
#14

[eluser]Solarpitch[/eluser]
Thanks therealmaloy... it was just what I needed to get me off on the right path.

Can you check your PM please.
#15

[eluser]therealmaloy[/eluser]
Solarpitch

done. Smile guess that's secret for now. ahahaha.

happy coding.




Theme © iAndrew 2016 - Forum software by © MyBB