$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('servizio_id'));
$query->from($db->quoteName('#__configurazione'));
$query->where($db->quoteName('id') . ' = 1' );
$db->setQuery($query);
$servizio_id = (int)$db->loadResult();