Welcome Guest, Not a member yet? Register   Sign In
Where insert loop? Controller or model?
#1

Hi!

Which way to put the loop will be better?

Controller
PHP Code:
for ( $i=0$i $MaxI$i++ ) { 
    
$variable[] = $this->Name_model->GetItem();



Model
PHP Code:
for ( $i=0$i $MaxI$i++ ) { 
    
$this->db->where'Name''My Name' );
    
$result[] = $this->db->get();

Reply


Messages In This Thread
Where insert loop? Controller or model? - by vertisan - 02-01-2016, 12:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB