Mise à part des paramètres de db

This commit is contained in:
jperon 2014-11-16 15:41:39 +01:00
parent 043dc068b0
commit aac1d83d08
3 changed files with 10 additions and 7 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
scores/
temp/
sources/
include/db.php
include/credentials.php
*~
license.txt
readme.html

View File

@ -0,0 +1,6 @@
<?php
define("HOST", "localhost"); // The host you want to connect to.
define("USER", "user"); // The database username.
define("PASSWORD", "password"); // The database password.
define("DATABASE", "database"); // The database name.
?>

View File

@ -6,13 +6,10 @@ function chant_from_id($c) {
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
$chants = array();
$ch = $req1->fetch_assoc();
return array($ch['office-part'], $ch['incipit'] > ''?$ch['incipit']:'░░░░', $ch['gabc'] > '', $ch['version']);
return array($ch['office-part'], $ch['incipit'], $ch['gabc'] > '', $ch['version']);
}
define("HOST", ""); // The host you want to connect to.
define("USER", ""); // The database username.
define("PASSWORD", ""); // The database password.
define("DATABASE", ""); // The database name.
include('credentials.php');
$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE);