original_string: public function delete_service($serviceid) {
          global $DB;
          $DB->delete_records('external_services_users', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_services_functions', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_tokens', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_services', array('id' => $serviceid));
      }
code: public function delete_service($serviceid) {
          global $DB;
          $DB->delete_records('external_services_users', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_services_functions', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_tokens', array('externalserviceid' => $serviceid));
          $DB->delete_records('external_services', array('id' => $serviceid));
      }
code_tokens: public function delete_service ( $ serviceid ) { global $ DB ; $ DB -> delete_records ( 'external_services_users' , array ( 'externalserviceid' => $ serviceid ) ) ; $ DB -> delete_records ( 'external_services_functions' , array ( 'externalserviceid' => $ serviceid ) ) ; $ DB -> delete_records ( 'external_tokens' , array ( 'externalserviceid' => $ serviceid ) ) ; $ DB -> delete_records ( 'external_services' , array ( 'id' => $ serviceid ) ) ; }
docstring: Delete a service
  Also delete function references and authorised user references.
  
  @param int $serviceid service id
docstring_tokens: Delete a service Also delete function references and authorised user references .