Hi,
I have a php function in the template, that allows me to get data from the database.
The function I created works perfectly, but with the tag {php}{/php} it is executed instantly and the result is written in the article, instead I need the function as result.
Is it possible to this function generate the result every time I reload the page?
This is the function:
{php}
$db = & JFactory::getDBO();
$query="SELECT * FROM `res_f2c_fieldcontent` WHERE fieldid = 49";
$db->setQuery($query) ;
$res= $db->loadResult();
echo $res;
{/php}
PHP 7.1.33
Joomla! 3.9.15
Form2Content Pro v 6.17.4