12-08-2007, 05:50 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Jul 2005
Location: UK
Posts: 121
Thanks: 41
|
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!
|
|
|
|