I have just installed Fabrik 4Z on a fresh Joomla 5 installation (no other components). I'm a bit rusty with Fabrik...
I have tried a calc formula with Axaj triggered by a database join element [called link] on the same form, looking to return a row from another table based on the id being equal to the selected item (raw) on my dropdown. I followed the wiki for common php Joomla 4+ queries, so the code should look vaguely 'familiar'...
It dies quietly, so this is the debug: information -
I don't really get that as I'm not knowingly using $new... so wondered if there is an error in my code or a bug that stops this element working?
Thanks for any help
I have tried a calc formula with Axaj triggered by a database join element [called link] on the same form, looking to return a row from another table based on the id being equal to the selected item (raw) on my dropdown. I followed the wiki for common php Joomla 4+ queries, so the code should look vaguely 'familiar'...
// Get a db connection in Joomla 4+ (adapted code).
$db = \Joomla\CMS\Factory::getContainer()->get('DatabaseDriver');
// Create a new query object.
$myQuery = $db->getQuery(true);
$myQuery
->select(array('name','summary','basic', 'intermediate'))
->from('sio_table')
->where('id = ' . $db->quote('{feedback___link_raw}'));
// Assign the query to the db
$db->setQuery($myQuery);
// Load the results as an array of objects.
$rows = $db->loadObjectList();
//output result as an ordered list
$list = array();
foreach ($rows as $row)
{
$list[] = "<li>" . $row->name . " " . $row->summary . "</li>";
}
return "<ol>" . implode($list) . "</ol>";
$db = \Joomla\CMS\Factory::getContainer()->get('DatabaseDriver');
// Create a new query object.
$myQuery = $db->getQuery(true);
$myQuery
->select(array('name','summary','basic', 'intermediate'))
->from('sio_table')
->where('id = ' . $db->quote('{feedback___link_raw}'));
// Assign the query to the db
$db->setQuery($myQuery);
// Load the results as an array of objects.
$rows = $db->loadObjectList();
//output result as an ordered list
$list = array();
foreach ($rows as $row)
{
$list[] = "<li>" . $row->name . " " . $row->summary . "</li>";
}
return "<ol>" . implode($list) . "</ol>";
It dies quietly, so this is the debug: information -
Debug: Eval exception : existing_items (id 70)::_getV() :
[then obviously the above code, no point repeating it]
Since joomla/database 2.2.0: The parameter $new is deprecated and will be removed in 4.0, use Joomla\Database\DatabaseDriver::createQuery() instead.I don't really get that as I'm not knowingly using $new... so wondered if there is an error in my code or a bug that stops this element working?
Thanks for any help