Compatibility issue with JDatabaseQuery in Joomla 1.7

41 views
Skip to first unread message

Andrew Eddie

unread,
Jun 2, 2011, 9:45:10 PM6/2/11
to joomla-de...@googlegroups.com
JDatabaseQuery is now abstract due of the work done to support new
database engines (Windows Azure and Microsoft SQL Server). This means
you must use $db->getQuery(true); to instantiate a query as is the
correct practice in Joomla 1.6.

The correct, advertised way to use JDatabaseQuery in 1.6 was:

$db = JFactory::getDbo();
$query = $db->getQuery(true);

The following incorrect practice will no longer work in 1.7.

$db = JFactory::getDbo();
$query = new JDatabaseQuery;

Developers of 1.6 extensions are advised to upgrade their code
immediately to the correct format (which will work fine in both Joomla
1.6 and 1.7).

Wiki page has been updated:

http://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_1.7_and_Joomla_Platform_11.1

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.6 developers

Reply all
Reply to author
Forward
0 new messages