TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 12-08-2007, 05:50 PM   #1 (permalink)
The Acquainted
Inquisitive 
 
Join Date: Jul 2005
Location: UK
Posts: 121
Thanks: 41
Brook is on a distinguished road
Default Multiple queries or not?

Hi again all (I'm sure you'll be sick of all my questions soon!),

I am a nube when it comes to PHP, but I am doing my best to learn. I have read the first few chapters of PHP and MYSQL by Larry Ulman and 'think' I have a basic grasp.

The first page I want to create is the homepage for my vbulletin powered forum/site. The page will contain a mix of static html and a bunch of queries from vbulletin.

The queries on the page will simply be calling in thread data. Latest threads posted from certain sections (eg forum sections used for articles, news, guides etc).

They will be laid out with one main story at the top, followed by two featured stories underneath. Then blocks for the latest 10 threads from each of the articles section, news section, guides section.

I'll be able to flag which story is the main or a feature, by using different thread icons.

Methods

I guess there are two ways to do this. Either have a seperate query for each bit. Eg one query for the main story, another for the two featured items, then one each for the latest 10 threads from the articles, news, guides section.

Or

Have one query for the lot and use PHP to sort and display them accordingly.

Your thoughts?

What do you think is the best way to go about it? I guess the query for each will be the easiest - but how much more difficult will it be to get PHP to sort the data how I want it? Don't forget I am a nube lol (although eager to learn :)) Any other thoughts or considerations?

Thanks in advance for your help.
__________________
PS3 Forums on GameSlurp - the site for gaming fans!
Brook is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:37 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design