Duplicate content with findAll() - CI4 |
In my model this is present:
PHP Code: public function lastComments($limit){ It then takes all the last tot * comments from the 'comments' table. I created a loop with foreach: Code: <?php if (!empty($lastComments) && is_array($lastComments)) : ?> Unfortunately, however, it duplicates the results, oddly enough, since I use similar code to pick up other items without problems. Where am I wrong?
I solved it like this:
PHP Code: public function lastComments($limit){ But I would still like to understand why he duplicated the results that way, does anyone have any ideas? |
Welcome Guest, Not a member yet? Register Sign In |