You are here: Which is faster, a MySQL access, or a set of PHP variables? « PHP « IT news, forums, messages
Which is faster, a MySQL access, or a set of PHP variables?

Posted by Dave M G on 12/30/05 16:32

PHP General,

I have a site where I will set the interface up to be multilingual.
This means that all the snippets of text which make up the menu and
other elements of navigation common to most pages will be stored as
variables.

In most web site set ups that I have seen, especially on forums, the
text is stored in a PHP script which is just a long list of variables.

I wondered if there was any downside to storing the list of interface
texts in a MySQL database, then calling them as an array when the page
loads?

This would have one minor advantage, which is that as I expand to new
languages, I could build a simple web interface where people could input
new languages into a form.

However, is it a drag on a server to have to reach into the MySQL
database to retrieve the array of texts each time the page loads? Note
that the texts will be something like 20 to 30 small one to four word
phrases like "contact" and "previous page" and that sort of thing.

On the surface, it doesn't seem like this would be much different than
accessing a PHP script with a list of variables. But then, I figured
there might be a reason why I've never seen it done this way.

Opinions would be much appreciated.

--
Dave M G

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация