This is my question. If I am coding an article directory, something pretty simple that goes like this :
- $title
- $intro
FOREACH sub-part
- $sub-title
- $sub-text
- $conclusion
Which would be the best in terms of performances ?
A MySQL table with two rows, title and text ? Knowing that in text I could put it all in one as :
$text = $intro + $all-sub-parts + $conclusion
Or, for each article, an XML file like this :
<file><title>title</title> <subpart1> <title>sub-title</title> <text>sub-text</text> </subpart1> <subpart2> <title>sub-title</title> <text>sub-text</text> </subpart2></file>
And each time the user wants to see that article, the script would interpret and rende that XML file to fit the design of the article directory.
Which do you think is lighter / faster to execute ? Which has better performances ?
Thanks.


Sign In
Create Account

Back to top









