My b2evolution Version: 0.93
HI!
I am using this code fragment to get some articles out of the database:
$sql = "SELECT ID , post_title, post_urltitle, post_issue_date
FROM evo_posts
INNER JOIN evo_postcats ON ID = postcat_post_ID
INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE cat_blog_ID = '7'
AND post_status = 'published'
GROUP BY post_issue_date
LIMIT $limit";
But if I set the limit to none or remove it, it keeps spitting out the newest article on and on and never stops. How can I make the script to stop when the newest article is selected?
I can't tell you from this piece what the JOINs do, but does the repeat really come from this code? In other words, does the code give the same result if you directly execute it in phpMyAdmin? In even other words: can the preceding php have anything to do with it?
Further you could try to strip the code from a few lines and see when it starts to repeat the output, but I think you tried that already.
Good luck