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
See Announcement
We are still working on the Joomla update.
thanks for the quick feedback Hugh... i think you are right, i should rather make the effort and merge the various fields into one... it is an effort but the db becomes slimmer afterwards.No, forget that last post, you'd need some PHP.
-- hugh
$myDb = FabrikWorker::getDbo();
$myQuery = $myDb->getQuery(true);
foreach ($data[0] as $row) {
//var_dump($row);exit;
$myQuery->clear();
$myQuery->update('vol_volunteers');
foreach(array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun') as $day) {
$dayArray = array();
foreach (array('Mor' => '1', 'Aft' => '2', 'Eve' => '3') as $shift => $key) {
$fieldName = $day . '_' . $shift;
$elName = 'vol_volunteers___' . $fieldName;
//var_dump($elName);
if ($row->$elName == '1') {
$dayArray[] = $key;
}
}
$dayJSON = json_encode($dayArray);
$dayField = 'avail_' . strtolower($day);
$myQuery->set($dayField . ' = ' . $myDb->quote($dayJSON));
}
$myQuery->where('v_ID = ' . $myDb->quote($row->vol_volunteers___v_ID));
$myDb->setQuery($myQuery);
$myDb->execute();
}
$optionMap = array('pre_primary' => '1', 'primary' => 2', 'secondary' => '3', etc);