I am new to joomla. I have developed a simple module. I need to fetch data from database in a function of helper.php. I am using

$db = JFactory::getDbo();

But it giving fatal error

Uncaught Error: Class 'JFactory' not found in
  • 1
    Could you provide the structure of your module folder, how you're including the helper.php and also the contents of the helper.php – Lodder Jun 4 '18 at 19:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.