Hi
I wanted to try and create a custom module which containted some text and data from my fabrik databases. I have tried to do this with Sourcerer but I can not seem to get it to return anything. I have tried code along the lines of:
{source}<?php
$query = $db->getQuery(true)
->select($db->quoteName('factory'))
->from('object_table')
->where($db->quoteName('id').' = '.$db->quote('3'));
$db->setQuery($query);
$result = $database->loadResult();
return $result;
?>{/source}
but nothing is being returned.
Have I missed something or is it not possible to return data this way?
Many thanks
I wanted to try and create a custom module which containted some text and data from my fabrik databases. I have tried to do this with Sourcerer but I can not seem to get it to return anything. I have tried code along the lines of:
{source}<?php
$query = $db->getQuery(true)
->select($db->quoteName('factory'))
->from('object_table')
->where($db->quoteName('id').' = '.$db->quote('3'));
$db->setQuery($query);
$result = $database->loadResult();
return $result;
?>{/source}
but nothing is being returned.
Have I missed something or is it not possible to return data this way?
Many thanks