You are here: Re: DB -> Flat file, did I waste my time? « PHP Programming Language « IT news, forums, messages
Re: DB -> Flat file, did I waste my time?

Posted by Jim Carlock on 01/24/07 16:25

"FFMG" <spambucket@myoddweb.com> wrote:
: In my site I have a config table, (MySQL), with about 30 entries;
: the data is loaded on every single page load. This is not the only
: call to the db, (we do a total of about 8 calls to the db).
:
: As with many configurations settings, once the options are set
: the values will not change much.

Use an include file that holds a function that returns the data inside
an array. This works well for textual and numeric data.

<?php
require("data.php")
?>

<data.php>
function GetMyArray() {
return(array("data1", "data2", 1, 2, 3, 4));
}
</data.php>

Good luck!

--
Jim Carlock
Post replies to the group.

 

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

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