Location: PHPKode > projects > logViewSQL > apache/db-connect-apache.php
<?php
/* 
 * This is a php frontend for mod_log_sql. It interfaces
 * with the table structure as defined in a MySql database and has been
 * tested only with version 1.16 of mod_log_sql.
 *
 * contact hide@address.com
 *
 */
        $host           = "sql.home"; // database host 
        $user           = "apacheview"; // username for the database
        $pass           = "auser14"; // password for the host
        $database       = "apache"; // the database that contains your logs

        if($dblink = mysql_connect($host, $user, $pass) or die("Couldn't connect to db")){
                if(!mysql_select_db($database)){
                        printf("<p><b>Error connecting to $database. (%s [%d])\n", mysql_error(), mysql_errno());
                        exit();
                }
        }
        else{
                printf("<p><b>Error connecting to $database. (%s [%d])\n", mysql_error(), mysql_errno());
                exit();
        }
?>
Return current item: logViewSQL