Describe database properly in config file.
This commit is contained in:
parent
f40b498ea1
commit
c9b6934be5
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ $data = json_decode(file_get_contents('../data/index.txt'));
|
||||||
// retrieve links from database
|
// retrieve links from database
|
||||||
$db_config = json_decode(file_get_contents('../conf/database.conf'));
|
$db_config = json_decode(file_get_contents('../conf/database.conf'));
|
||||||
include('lib/database.php');
|
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");
|
$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>
|
?><!DOCTYPE HTML>
|
||||||
|
|
Loading…
Reference in a new issue