Using the Access Driver
Using the MySQL Driver
Options are defined in the defines.php file using the following format :
define("NAME","VALUE");
Where "NAME" is the name of the defined value and "VALUE" is its value (Quotes (") are required).
In order to tell Profuturus which database driver to use, you must set the DATABASE_TYPE define to the value listed below the specfic driver you wish to use.
The Following Options in the defines.php file are used by all the database drivers.
Option | Description | Default |
INVENTORY_TABLE | The name of the table in the database that will be used to store the inventory items | inventory |
VIEW_TABLE | The name of the database table that will store the views | tblView |
OPTIONS_TABLE | The name of the database table that stores user-configurable options | tblOptions |
VALIDATE_TABLE | The name of the database table that stores the field input validators | tblValidate |
LIST_TABLE | The name of the database table that stores the lists | tblLists |
DESCRIPTION_TABLE | The name of the database table that stores the inventory field descriptions | tblDescriptions |
DATE_FORMAT | This is not a Database option, but is used to determine what format dates will use when they are displayed. It can be any valid input for the php date function | n/j/Y |
Sample:
define("INVENTORY_TABLE", "inventory");
define("VIEW_TABLE", "tblView");
define("OPTIONS_TABLE", "tblOptions");
define("VALIDATE_TABLE", "tblValidate");
define("LIST_TABLE", "tblLists");
define("DESCRIPTION_TABLE", "tblDescriptions");
define("DATE_FORMAT", "n/j/Y");
define("DATABASE_TYPE", "access_database");
The Access Database Driver requires the following defines in the defines.php file.
Option | Description |
ACCESS_DB_PATH | The file path of the Access Database. If you are on a Windows System, you must use double slashes (\\) as folder seperators. |
ACCESS_DB_USER | The Username of the user that will access the Access Database |
ACCESS_DB_PASSWORD | The Password of the user that will access the Access Database |
Sample:
define("ACCESS_DB_PATH", "C:\\Inetpub\\Databases\\profuturus.mdb");
define("ACCESS_DB_USER", "");
define("ACCESS_DB_PASSWORD", "");
define("DATABASE_TYPE", "mysql_database");
The MySQL Database Driver requires the following defines in the defines.php file.
Option | Description |
MYSQL_SERVER | The server and (optionally port) that the MySQL database is on. Format is server[:port] |
MYSQL_USER | The Username used to connect to the MySQL server |
MYSQL_PASSWORD | The Password used to connect to the MySQL server |
MYSQL_DATABASE | The database on the MySQL Server to use |
Sample:
define("MYSQL_SERVER", "localhost:3306");
define("MYSQL_USER", "profuturus");
define("MYSQL_PASSWORD", "my_password");
define("MYSQL_DATABASE", "profuturusDB");