Fix lib: DBTarget 輸出形態

This commit is contained in:
Yuan Chiu 2015-03-12 16:08:48 +08:00
parent 470d85ae72
commit f3ac46ae4f

View File

@ -176,23 +176,23 @@ class DBTarget extends Database {
foreach($queryResultAll as $key => $thisResult) { foreach($queryResultAll as $key => $thisResult) {
array_push($result, array_push($result,
array( 'theme_id' => $thisResult['ThID'], array( 'theme_id' => (int)$thisResult['ThID'],
'target_id' => $thisResult['TID'], 'target_id' => (int)$thisResult['TID'],
'weights' => $thisResult['Weights'], 'weights' => (int)$thisResult['Weights'],
'hall_id' => $thisResult['HID'], 'hall_id' => (int)$thisResult['HID'],
'hall_name' => $thisResult['HName'], 'hall_name' => $thisResult['HName'],
'area_id' => $thisResult['AID'], 'area_id' => (int)$thisResult['AID'],
'area_name' => $thisResult['AName'], 'area_name' => $thisResult['AName'],
'floor' => $thisResult['AFloor'], 'floor' => (int)$thisResult['AFloor'],
'area_number' => $thisResult['ANum'], 'area_number' => (int)$thisResult['ANum'],
'target_number' => $thisResult['TNum'], 'target_number' => (int)$thisResult['TNum'],
'name' => $thisResult['TName'], 'name' => $thisResult['TName'],
'map_url' => $thisResult['TMapID'], 'map_url' => $thisResult['TMapID'],
'learn_time' => $thisResult['TLearnTime'], 'learn_time' => (int)$thisResult['TLearnTime'],
'PLj' => $thisResult['PLj'], 'PLj' => (int)$thisResult['PLj'],
'Mj' => $thisResult['Mj'], 'Mj' => (int)$thisResult['Mj'],
'S' => $thisResult['S'], 'S' => (int)$thisResult['S'],
'Fj' => $thisResult['Fj'] 'Fj' => (int)$thisResult['Fj']
)); ));
} }
return $result; return $result;
@ -287,10 +287,10 @@ class DBTarget extends Database {
foreach($queryResultAll as $key => $thisResult) { foreach($queryResultAll as $key => $thisResult) {
array_push($result, array_push($result,
array( 'area_id' => $thisResult['AID'], array( 'area_id' => (int)$thisResult['AID'],
'hall_id' => $thisResult['HID'], 'hall_id' => (int)$thisResult['HID'],
'floor' => $thisResult['AFloor'], 'floor' => (int)$thisResult['AFloor'],
'area_number' => $thisResult['ANum'], 'area_number' => (int)$thisResult['ANum'],
'name' => $thisResult['AName'], 'name' => $thisResult['AName'],
'map_url' => $thisResult['AMapID'], 'map_url' => $thisResult['AMapID'],
'introduction' => $thisResult['AIntroduction'] 'introduction' => $thisResult['AIntroduction']