1
0
Fork 0

Describe database properly in config file.

This commit is contained in:
Andrew Tomaka 2011-10-04 05:13:01 -04:00
parent f40b498ea1
commit c9b6934be5
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ $data = json_decode(file_get_contents('../data/index.txt'));
// retrieve links from database
$db_config = json_decode(file_get_contents('../conf/database.conf'));
include('lib/database.php');
$db = new Database($db_config->hostname,$db_config->username,$db_config->password,$db_config->table);
$db = new Database($db_config->hostname,$db_config->username,$db_config->password,$db_config->database);
$links = $db->query("SELECT id,url,text,status,released_date FROM wia_links WHERE status = 2 OR status = 3 ORDER BY released_date DESC LIMIT 15");
?><!DOCTYPE HTML>