12 $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
12 $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
13 $result = $mysqli->query($query); |
13 $result = $mysqli->query($query); |
14 //Copy result into a associative array |
14 //Copy result into a associative array |
15 $resultArray = $result->fetch_array(MYSQLI_ASSOC); |
15 $resultArray = $result->fetch_array(MYSQLI_ASSOC); |
16 if ($resultArray['online'] == 'Y') { |
16 if ($resultArray['online'] == 'Y') { |
17 $resultArray['online'] = true; |
17 $resultArray['online'] = 1; |
18 } else { |
18 } else { |
19 $resultArray['online'] = false; |
19 $resultArray['online'] = 0; |
20 } |
20 } |
21 echo json_encode($resultArray); |
21 echo json_encode($resultArray); |