The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
What is missing here?
I made the query, template and page code using existing, working elements in use elsewhere. My questions are these:
1. Why does this return only one result, when it should obviously return 10? 2. Why does it not return the correct results...the top article has over 6000 views. The page in question (and there are two sets of this problem on it) is: http://www.mcseworld.com/forums/library.php The query, template and page code were revised from that which drives this page: http://www.mcseworld.com/forums/lastthreads.php where they work quite nicely. The SQL query: Code:
// Get Popular Articles $populararticle = $DB_site->query("SELECT * FROM thread WHERE forumid IN (252,253,254,255,256,257,258,259,260,261,262,263,264) ORDER BY views DESC LIMIT 10"); while ($populararticles = $DB_site->fetch_array($populararticle)) { eval('$library_populararticles = "' . fetch_template('library_populararticles') . '";'); } // Get Popular Articles The template: PHP Code:
PHP Code:
|
#2
|
||||
|
||||
Try:
PHP Code:
|
#3
|
|||
|
|||
Great, that was it...I guess it was just too sloppy for its own good.
Now, I have another question...I cannot seem to extract the date/time properly. Here is my query: Code:
// Get Recent Articles $lastarticle = $DB_site->query(" SELECT * FROM thread WHERE forumid IN (252,253,254,255,256,257,258,259,260,261,262,263,264) ORDER BY dateline DESC LIMIT 10 "); while ($lastarticles = $DB_site->fetch_array($lastarticle)) { eval('$library_lastarticle .= "' . fetch_template('library_lastarticle') . '";'); } $lastarticlesdate = vbdate($vboptions['dateformat'], $lastarticles['dateline']); $lastarticlestime = vbdate($vboptions['timeformat'], $lastarticles['dateline']); // Get Recent Articles PHP Code:
Thanks again for your help! |
#4
|
|||
|
|||
dontpanic,
Instead of: PHP Code:
PHP Code:
Cheers, g-force2k2 |
#5
|
|||
|
|||
Oh duh, thanks! Working perfectly now.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|