IMakeLousyCode Posted October 4, 2006 Share Posted October 4, 2006 Hi! I would like to know the experts opinion about a php script fetching news ;DOk, so on this site it is possible to add, modify and delete news to be displayed on the website. But which way is the most efficient and quick way to store these news? In separate text files -> news_1.txt, news_2.txt ... which then is opened and read, or in one file only news separated maybe like <id=1>news</id>Does it really differ or matter concerning the dowloading time of the page?Thanks for help Link to comment https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/ Share on other sites More sharing options...
JasonLewis Posted October 4, 2006 Share Posted October 4, 2006 it depends on you really. i would prefer mysql but if i didnt have that i would go for your 2nd option. you may end up with to much txt documents etc. that would be neater. but overall, sql is much better and secure. Link to comment https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/#findComment-103600 Share on other sites More sharing options...
roopurt18 Posted October 4, 2006 Share Posted October 4, 2006 The number of text files you end up with is really of no concern as long as there is a file management system. The first option is the better option in my opinion.What will happen when there are lots of articles for the site and the single text file grows to be very large? You will have a lot of text parsing to go through to find the specific article you want which will not a fast website make.What I really have to wonder is why aren't you using MySQL? Link to comment https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/#findComment-103602 Share on other sites More sharing options...
ponsho Posted October 4, 2006 Share Posted October 4, 2006 I totally agree with roopurt18, i would use the first option if i couldnt use mysql, maybe with an index file or something like that Link to comment https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/#findComment-103607 Share on other sites More sharing options...
IMakeLousyCode Posted October 4, 2006 Author Share Posted October 4, 2006 Okies, I will do it using MySQL! Thanks Link to comment https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/#findComment-103621 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.