Added a pathMod variable to db_init so that files in /forums could use it properly.

svn path=/trunk/boinc/; revision=2097
This commit is contained in:
David Anderson 2003-08-14 00:59:09 +00:00
parent 29492ebfd3
commit 5a3e4273d6
1 changed files with 4 additions and 2 deletions

View File

@ -1,15 +1,17 @@
<?php
require_once('util.inc');
// database-related functions.
// Presentation code (HTML) shouldn't be here
function db_init() {
function db_init($pathMod='') {
$retval = mysql_connect();
if (!$retval) {
echo "Unable to connect to database - please try again later";
exit();
}
$db_name = parse_config("<db_name>"); // TODO: Change to a specific db for testing.
$db_name = parse_config("<db_name>", $pathMod);
if(!mysql_select_db($db_name)) {
echo "Unable to select database - please try again later";
exit();