As always, we will start by defining our global constants, then we'll move onto create our
data schema (and database), followed by our data class, then our box classes and finally, we'll create
the .phtml file, which will bring it all together into a working example - or at least, that's the plan
at the moment!
This is a straight forward PHP file, which I create to define Constant values I can use
across a whole site. By using this - appropriately - I can change the look/feel of a site from one
place, rather than having to chase variable values across multiple pages. Here's our constants.inc sample:
Under no circumstances should this be taken as a de-facto database schema, but it works for
the purposes of this example:
As you can see, the data for News is in a table in its own right, whilst the race, driver,
team and points details are the result of related tables. Suffice to say, if you do not understand
this schema, you should go and read up on some RDBMS introductory material before going any further.