Add: sql - login, history_record

This commit is contained in:
2018-05-17 18:51:09 +09:00
parent 976e5563b7
commit 235327cd3e
19 changed files with 529 additions and 91 deletions
@@ -0,0 +1,38 @@
<?php
header('Content-Type: application/json');
include "send_error_code.php";
include "connect_db.php";
$return_array = array();
$query = "SELECT * FROM afterschool_activated_stage";
$result = mysqli_query($db_conn, $query);
$return_array = array();
if ( $result ) {
// echo "조회된 행의 수 : ".mysqli_num_rows($result)."<br />";
if($result) {
$rows = array();
while($row = mysqli_fetch_assoc($result)) {
// $row_array['Language'] = $row['Language'];
$row_array['StageName'] = $row['StageName'];
$row_array['Activated'] = $row['Activated'];
array_push($return_array, $row_array);
}
}
} else {
send_error_code("Error : ".mysqli_error($db_conn));
}
echo json_encode($return_array, JSON_UNESCAPED_UNICODE);
// 결과 해제
mysqli_free_result($result);
$db_conn->close();
?>