Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1433

Joomla! 4.x Coding • is quoteName() different in 4.0 to 3.10??

$
0
0
A quick question: in all versions up to and including J3.10 the JDatabase::quoteName() function did table prefix replacement: $db->quoteName('#_my_table') would yield something like q78ty_my_table.

This appears not to be the case in 4.x unless I'm doing something really stupid.

Is it now necessary to use replacePrefix() for this?

e.g. the previously relatively readable

Code:

$query->leftJoin($db->quoteName('#__users', 'u') . ' ON u.id = g.owner_id');
now becomes

Code:

$query->leftJoin($db->quoteName($db->replacePrefix('#__users'), 'u') . ' ON u.id = g.owner_id');

Statistics: Posted by david0058 — Fri Dec 20, 2024 6:04 pm



Viewing all articles
Browse latest Browse all 1433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>