More than 800+ satisfied clients and counting, since 2010

Blog

Load Objects from SQL Queries in Joomla CMS

Load Objects from SQL Queries in Joomla Correctly

Load Objects from SQL Queries in JoomlaUsing codes now you can easily load objects from SQL queries. If you wish to do the same, then just copy paste this functional code in your configuration.php file. The correct way to load objects from SQL queries in Joomla is given below.

How to Load Objects from SQL Queries in Joomla

$query ->select(‘id, menutype, title’)

->from(‘#__menu_types’)

->where(‘menutype=’.$db->quote($somemenu));

$db->setQuery($query);

Possible Errors

Some of the Possible errors that you may face while implementing the code is:

  • Site configured to mod_rewrite() with no .htaccess file
  • Actual website is located in a different directory tan root directory.

Solutions to Above Errors

These above errors can be resolved by the following way:

  • Disable mod_rewrite()
  • Update RewriteBase / to RewiteBase / subfolder /

If you are still unable to insert it or are facing any problem, then request a quote today.

Written by

The author didnt add any Information to his profile yet