Welcome Guest, Not a member yet? Register   Sign In
Active Record "get()" with "limit()" and pagination/uri segment value displaying one too few results
#4

[eluser]Dan Storm[/eluser]
[quote author="fiddle-sticks" date="1305564729"]yeah the query is fine - it ends in "LIMIT 12".
But still I am only getting 11 pictures being displayed in my view.
My view code goes roughly like this:
Code:
foreach($data->result() as $row):
if (@GETIMAGESIZE('template_images/' . $row->thumb_path)) {
echo "<div class='thumb_container'>";
$thumb_output = "<a >template_id . "' ><img src='" . $base_url  . '>thumb_path . "' /><div class='title_overlay'><strong>";
echo "</div>";
}
endforeach;
[/quote]

You probably get 12 rows returned but your if condition:
Code:
if (@GETIMAGESIZE('template_images/' . $row->thumb_path))
probably fails on one the first 12 rows and because of your encapsulation nothing gets outputted.


Messages In This Thread
Active Record "get()" with "limit()" and pagination/uri segment value displaying one too few results - by El Forum - 05-16-2011, 05:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB