Skip to content

Commit

Permalink
Fixing the same bug upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Aug 18, 2015
1 parent a0cdf2a commit 722317f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions _tuts/database-copy-the-init-db-php-script.diff
@@ -1,6 +1,6 @@
diff --git a/init_db.php b/init_db.php
new file mode 100644
index 0000000..af3febc
index 0000000..075484b
--- /dev/null
+++ b/init_db.php
@@ -0,0 +1,56 @@
Expand All @@ -16,14 +16,14 @@ index 0000000..af3febc
+/*
+ * 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
2 changes: 1 addition & 1 deletion _tuts/steps.json
Expand Up @@ -356,5 +356,5 @@
"description": null
}
],
"sha": "1f548b0ab40184c4c44f4956e1457318bf3e6280"
"sha": "a0cdf2a135835e1b5a9c7713abe3b55f93b52643"
}

0 comments on commit 722317f

Please sign in to comment.