From 8ae1e1089c43d1fc8176d57a1c93a2887180c6bd Mon Sep 17 00:00:00 2001 From: pisouvigne Date: Sun, 14 Jun 2020 17:17:37 +0200 Subject: [PATCH] database --- site/vue/database/insert.php | 25 +++++++++++++++++++++++++ site/vue/index.html | 1 + site/vue/js/db.js | 11 +++++++++++ 3 files changed, 37 insertions(+) create mode 100644 site/vue/database/insert.php create mode 100644 site/vue/js/db.js diff --git a/site/vue/database/insert.php b/site/vue/database/insert.php new file mode 100644 index 0000000..735ad79 --- /dev/null +++ b/site/vue/database/insert.php @@ -0,0 +1,25 @@ +connect_error) { + exit('Could not connect'); +} + +$sql = "SELECT pseudo, score, id FROM score"; + +$stmt = $mysqli->prepare($sql); +$stmt->execute(); +$stmt->store_result(); +$stmt->bind_result($pseudo, $score, $id); +$stmt->fetch(); +$stmt->close(); + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo "
CustomerID" . $pseudo . "CompanyName" . $score . "ContactName" . $id . "
"; +?> \ No newline at end of file diff --git a/site/vue/index.html b/site/vue/index.html index f774488..f487292 100644 --- a/site/vue/index.html +++ b/site/vue/index.html @@ -223,6 +223,7 @@ +