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
Form2Content Forum
Questions and answers for Form2Content, a Joomla CCK.
- moreno
- F2C article templating
- Friday, 28 February 2020
- Subscribe via email
- Page :
- 1
There are no replies made for this post yet.
However, you are not allowed to reply to this post.
However, you are not allowed to reply to this post.