API code style tidy

This commit is contained in:
Marcus Hill
2023-01-01 16:00:07 +00:00
parent 6746edda1a
commit ff741c223e
22 changed files with 461 additions and 461 deletions

View File

@@ -6,21 +6,21 @@
* Returns success & data messages
*/
if($sql && mysqli_num_rows($sql) > 0){
$return_arr['success'] = "True";
$return_arr['count'] = mysqli_num_rows($sql);
if ($sql && mysqli_num_rows($sql) > 0) {
$return_arr['success'] = "True";
$return_arr['count'] = mysqli_num_rows($sql);
$row = array();
while($row = mysqli_fetch_array($sql)){
$return_arr['data'][] = $row;
}
$row = array();
while ($row = mysqli_fetch_array($sql)) {
$return_arr['data'][] = $row;
}
echo json_encode($return_arr);
exit();
echo json_encode($return_arr);
exit();
}
else{
$return_arr['success'] = "False";
$return_arr['message'] = "No resource (for this client and company) with the specified parameter(s).";
echo json_encode($return_arr);
exit();
else {
$return_arr['success'] = "False";
$return_arr['message'] = "No resource (for this client and company) with the specified parameter(s).";
echo json_encode($return_arr);
exit();
}