mysqli loop results
I have used the query builder to built my query and when I copy and paste the query into phpmyadmin I get multiple rows in my result set. Yet I am unable to loop through the results when using the following code: What am I doing wrong? My echo of total rows does echo the correct value.
<?php if(isset($myCarousel->TotalRows) && $myCarousel->TotalRows > 0) {
print_r($myCarousel);
$myCarousel->moveFirst();
echo "<br />Total rows are: {$myCarousel->TotalRows}";
while(!$myCarousel->atEnd()){
echo "<br />Image Heading is: {$myCarousel->getColumnVal('image_heading')}";
$myCarousel->moveNext();
}
}?>
I only get one row, the first one.