glitchking Posted January 20, 2010 Share Posted January 20, 2010 Hey all! I'm stumped on how to achieve something. Basically I want to run a dbquery and have 2 items show before an id and 2 after. Example Image Code Using: <?php $qresult = dbquery("SELECT * FROM `" . DB_PREFIX . "articles` INNER JOIN " . DB_ARTICLE_CATS . " ON article_cat=article_cat_id ORDER BY `article_id` DESC LIMIT 0 , 7"); if (dbrows($qresult) != 0) { $num2 = 1; while ($data = dbarray($qresult)) { if ($num2==1) {?> [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/189184-dbquery-support-needed/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.