Jump to content

DBQUERY Support Needed


glitchking

Recommended Posts

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

index.php?action=dlattach;topic=284878.0;attach=9520;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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.