select($from, 'status_id', ['id' => $id])[0]; } else { sendError("Command only valid for assets."); } if ($status == null) { $status = 0; } } $list = $database->select('status_labels', ['id', 'name', 'notes']); //array_unshift($list, ['id' => "0", name => "Other"]); die(json_encode(['status' => 'OK', 'itemstatus' => $status, 'list' => $list]));