@@ -84,7 +84,7 @@ public static function getLoginCountPerDeyPerService()
8484 $ stmt ->execute ();
8585 $ result = $ stmt ->get_result ();
8686 while ($ row = $ result ->fetch_assoc ()) {
87- echo "[new Date( " .$ row ["year " ].", " .($ row ["month " ] - 1 )."),' " .$ row ["idPName " ]."', {v: " .$ row ["count " ]."}], " ;
87+ echo "[new Date( " .$ row ["year " ].", " .($ row ["month " ] - 1 )."),' " .str_replace ( " ' " , " \' " , $ row ["idPName " ]) ."', {v: " .$ row ["count " ]."}], " ;
8888 }
8989 $ conn ->close ();
9090 }
@@ -100,7 +100,8 @@ public static function getAccessToServicesPerMonth()
100100 $ stmt ->execute ();
101101 $ result = $ stmt ->get_result ();
102102 while ($ row = $ result ->fetch_assoc ()) {
103- echo "[new Date( " .$ row ["year " ].", " .($ row ["month " ] - 1 )."),' " .$ row ["spName " ]."', {v: " .$ row ["count " ]."}], " ; }
103+ echo "[new Date( " .$ row ["year " ].", " .($ row ["month " ] - 1 )."),' " .str_replace ("' " ,"\' " ,$ row ["spName " ])."', {v: " .$ row ["count " ]."}], " ;
104+ }
104105 $ conn ->close ();
105106 }
106107
@@ -158,7 +159,7 @@ public static function getAccessCountPerService()
158159 $ stmt ->execute ();
159160 $ result = $ stmt ->get_result ();
160161 while ($ row = $ result ->fetch_assoc ()) {
161- echo "[' " . $ row ["spName " ]. "', " . $ row ["count " ]. "], " ;
162+ echo "[' " . str_replace ( " ' " , " \' " , $ row ["spName " ]) . "', " . $ row ["count " ] . "], " ;
162163 }
163164 $ conn ->close ();
164165 }
@@ -174,7 +175,7 @@ public static function getLoginCountPerIdp()
174175 $ stmt ->execute ();
175176 $ result = $ stmt ->get_result ();
176177 while ($ row = $ result ->fetch_assoc ()) {
177- echo "[' " . $ row ["idPName " ]. "', " . $ row ["count " ]. "], " ;
178+ echo "[' " . str_replace ( " ' " , " \' " , $ row ["idPName " ]) . "', " . $ row ["count " ] . "], " ;
178179 }
179180 $ conn ->close ();
180181 }
0 commit comments