Skip to content

Commit

Permalink
Fixing bug thanks to Tim Whitehead in the comments!
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Aug 18, 2015
1 parent 0fe4239 commit a0cdf2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/init_db.php
Expand Up @@ -10,14 +10,14 @@
/*
* CREATE THE DATABASE
*/
$pdoDatabase = new PDO('mysql:host=localhost', 'root', $databasePassword);
$pdoDatabase = new PDO('mysql:host=localhost', $databaseUser, $databasePassword);
$pdoDatabase->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdoDatabase->exec('CREATE DATABASE IF NOT EXISTS oo_battle');

/*
* CREATE THE TABLE
*/
$pdo = new PDO('mysql:host=localhost;dbname='.$databaseName, 'root', $databasePassword);
$pdo = new PDO('mysql:host=localhost;dbname='.$databaseName, $databaseUser, $databasePassword);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

// initialize the table
Expand Down

0 comments on commit a0cdf2a

Please sign in to comment.