Dynamic Site Methodology



Say you have a site that queries a database and dynamically generates 1000
pages all linked appropriately. Assume the information in the database is
relatively stable, changing on a weekly basis. I see at least two ways to
accomplish this:

1. Make all the pages php and query and create pages on the fly as needed
by the users.

2. Setup a cron task to call a php script and generate all the html pages
once a day during some low usage period.

Obviously, method 2 much more efficient than running MySQL queries for
each user. That said, I don't see many people doing this. I do realize
that PHP caches are designed to reduce the inefficiencies but why even mess
with them when you can create the entire site in html, via php?

.



Relevant Pages

  • Re: following radio & hidden does not work..... help please.
    ... So you query the database for records and present the concatenated fname and lname for the user to choose from. ... This works the same with a radio button or a select statement. ... This is a HTML or PHP question! ...
    (alt.html)
  • Re: Indent HTML portions question
    ... > the portion of the HTML where I jump out of php mode and back in again. ... // Connect to the database. ... errorMessage("One or more required fields were left blank. ...
    (comp.lang.php)
  • Re: Why not generate static pages instead of dynamic?
    ... html pages out there now, ... But querying a database, ... is fetched through AJAX or a 'more-dynamic' page (php ... dynamic/user-interaction page or not, and on that basis will serve the html ...
    (comp.lang.php)
  • Re: following radio & hidden does not work..... help please.
    ... Using a HTML radio button form as previously stated returns all the data as requested. ... The problem seems to be HOW does one get more than one database variable to be to the PHP action program. ... The objective of the form is to use either a or a radio button form so a user can select a person from the database. ...
    (alt.html)
  • Re: Accessing Class Method
    ... public $database; ... public $html; ...
    (comp.lang.php)