Skip to content
Snippets Groups Projects
Unverified Commit 95378902 authored by Dominik Baránek's avatar Dominik Baránek
Browse files

DB commands work with apostrophes in names

parent e4e7609c
No related branches found
No related tags found
1 merge request!4DB commands work with apostrophes in names
......@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
[Changed]
- DB commands work for apostrophe in IdP/SP names
## [v1.3.0]
[Added]
......
......@@ -84,7 +84,7 @@ class DatabaseCommand
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_assoc()) {
echo "[new Date(".$row["year"].",".($row["month"] - 1 )."),'".$row["idPName"]."', {v:".$row["count"]."}],";
echo "[new Date(".$row["year"].",".($row["month"] - 1 )."),'".str_replace("'","\'",$row["idPName"])."', {v:".$row["count"]."}],";
}
$conn->close();
}
......@@ -100,7 +100,8 @@ class DatabaseCommand
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_assoc()) {
echo "[new Date(".$row["year"].",".($row["month"] - 1 )."),'".$row["spName"]."', {v:".$row["count"]."}],"; }
echo "[new Date(".$row["year"].",".($row["month"] - 1 )."),'".str_replace("'","\'",$row["spName"])."', {v:".$row["count"]."}],";
}
$conn->close();
}
......@@ -158,7 +159,7 @@ class DatabaseCommand
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_assoc()) {
echo "['".$row["spName"]."', ".$row["count"]."],";
echo "['" . str_replace("'", "\'", $row["spName"]) . "', " . $row["count"] . "],";
}
$conn->close();
}
......@@ -174,7 +175,7 @@ class DatabaseCommand
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_assoc()) {
echo "['".$row["idPName"]."', ".$row["count"]."],";
echo "['" . str_replace("'", "\'", $row["idPName"]) . "', " . $row["count"] . "],";
}
$conn->close();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment