For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('sum('.$db->quoteName('column_name').')');
$query->from($db->quoteName('#__table_name'));
$db->setQuery($query);
$result = $db->loadResult();
return $result;
You can use placeholders in code, don't forget to put them in single quotes if they are for string values.
$foo_int = (int)'{mytable___some_integer}';
$foo_float = (float)'{mytable___some_decimal}';
$foo_int = (int)'';
$foo_int = ;