Fix: ranking record

This commit is contained in:
2018-05-29 19:45:52 +09:00
parent 34296567d0
commit 089a7d0b5c
10 changed files with 163 additions and 334 deletions
+4 -28
View File
@@ -9,8 +9,11 @@ include "./../setup/connect_db.php";
$replyJSON = get_active_app_list($maestro_id);
$db_conn->close();
if($replyJSON.length === 0) {
send_error_message($replyJSON, "앱 목록 가져오기 실패");
$db_conn->close();
exit;
}
@@ -22,8 +25,6 @@ $db_conn->close();
function get_active_app_list($maestro_id) {
global $db_conn;
$return_array = array();
$query = "
SELECT A.AppID, A.AppName, A.AppType
FROM moty_app AS A
@@ -33,41 +34,16 @@ function get_active_app_list($maestro_id) {
$stmt->execute();
$stmt->bind_result($app_id, $app_name, $app_type);
$return_array = array();
while($stmt->fetch()) {
$row_array['AppID'] = $app_id;
$row_array['AppName'] = $app_name;
$row_array['AppType'] = $app_type;
array_push($return_array, $row_array);
}
$stmt->close();
return $return_array;
/*
$result = mysqli_query($db_conn, $query);
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['AppName'] = $row['AppName'];
$row_array['AppType'] = $row['AppType'];
array_push($return_array, $row_array);
}
}
} else {
send_error_code("Error : ".mysqli_error($db_conn));
}
$db_conn->close();
mysqli_free_result($result);
return $return_array;
*/
}
?>