206 Part II: Developing Intranet Solutions TABLE 7-1 (Web hosting reseller)
Sunday, September 30th, 2007206 Part II: Developing Intranet Solutions TABLE 7-1 INTRANET DATABASE TABLES (Continued) Table Description MSG_VIEWER Holds the message viewer data, the message number (MSG_ID), and the viewer ID (VIEWER_ID). It relates which message should be viewed by which user. THEME Holds information about the available intranet themes that can be used by the user. It contains the theme number (THEME_ID) and the name of the theme (THEME_NAME). ACTIVITY Holds information about the user login/logout activities, discussed in Chapter 5. It contains the user ID (USER_ID), action type (ACTION_TYPE), and action timestamp (ACTION_TS). USER_DETAILS This table contains detailed user information. This table holds the user ID (USER_ID), first name (FIRST), last name (LAST), address line #1 (ADDRESS1), address line #2 (ADDRESS2), city (CITY), state (STATE), zip code (ZIPCODE), country (COUNTRY), phone number (PHONE), and start date of the user in the intranet (START_DATE). USER_PREFERENCE Contains the user preference information: the user ID (USER_ID), preference ID (PREFERENCE_ID), and value (VALUE). intranet.mysql is an implementation of the intranet database in MySQL. It s included on this book s CD-ROM (CDROM/ch07/sql/intranet.mysql). To use this database for these applications, create a database called INTRANET in your database server and run the following command: mysql -u root -p -D INTRANET < INTRANET.sql Make sure that you change the user name (root) to whatever is appropriate for your MySQL database system. The INTRANET database must be set up before you start designing the PHP classes, which are needed to implement the intranet applications.