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.
$shiftorder = '{fab_cp1_line_tour___shiftorder_raw}';
$shift = '{fab_cp1_line_tour___shift_raw}';
$date ='{fab_cp1_line_tour___date_raw}';
$machine ='{fab_cp1_line_tour___machine_raw}';
$myDb = FabrikWorker::getDbo(false, 2);
$myQuery = $myDb->getQuery(true);
$myQuery
->select('losses2_stops')
->from('bde_daten')
->where('shiftorder= ' . $myDb->quote($shiftorder))
->where('shift= ' . $myDb->quote($shift))
->where('date= ' . $myDb->quote($date))
->where('machine= ' . $myDb->quote($machine));
$myDb->setQuery($myQuery);
$total = $myDb->loadResult();
return $total;
return $shiftorder . ' ' . $shift . ' ' . $date . ' ' . $machine . ' ' . $total;
//$total=$myDb->loadResult();
return (string)$myQuery;