This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
inside/cron/db.php
T
2011-03-04 12:14:27 +01:00

13 lines
367 B
PHP

<?php
require '../inside/credentials-sample.php';
$str = getDSN();
preg_match('|([^:]+)://([^:]+):([^@]+)@([^/]+)/(.+)|', $str, $output);
list($str, $driver, $user_name, $password, $host_name, $db_name) = $output;
if(!mysql_connect($host_name, $user_name, $password)) die("error connecting to db");
if(!mysql_select_db($db_name)) die('error selecting databse');