[eluser]face1m[/eluser]
Greetings forum:
I am trying to convert some php code to the mvc.
Here is the code:
<?php
for( $i =1; $i <= 39 ; $i++ ) {
$result = mysql_query( "select count(*) from pball where pball =" . $i );
$count = mysql_result($result, 0);
$pball[$i] = $count;
}
?>
This makes a repeated query to the db for the total count of number $i. Afterward the for loop completes I would like to return an array.
I figure the above code goes in the model and called by the controller.
I am stumped. I am new to codeigniter and mvc. I'm thinking there is an easy solution, but its hard hitting for me. thanks in advance.
rick mcelderry