New answers tagged database
6
votes
Accepted
Change database password?
The correct method is to update database password first, either via your hosting control panel or the command line.
Then manually update the password in configuration.php either through the File ...
- 146
1
vote
Migrating custom module to Joomla 4
$input = $app->input; is deprecated too. You should use in Joomla 4 $input = $app->getInput(); instead.
Also you can load database form DI container by this code:
use Joomla\Database\...
3
votes
Migrating custom module to Joomla 4
Lodder's answer is fully valid, however he did not want to waste time to reformulate the query part of this old script in the question. As a morning drill during my coffee time I corrected that part ...
- 2,616
3
votes
Migrating custom module to Joomla 4
JRequest was deprecated in Joomla 2.5 (I think), so you can now use JInput, like so:
use Joomla\CMS\Factory;
$db = Factory::getDbo();
$input = Factory::getApplication()->input;
$id = $input->...
- 26.7k
2
votes
loadObjectList() returns array indexed by empty string
We can improve queries with prepared statements. As example:
$query = $db
->getQuery(true)
->select('*')
->from($db->qn('#__mail_templates'))
->where($db->qn('...
- 79
1
vote
Accepted
loadObjectList() returns array indexed by empty string
Meh. Buggy line should be
$rows = $db->setQuery($query)->loadObjectList();
A warning would have been nice...
- 495
Top 50 recent answers are included
Related Tags
database × 199joomla-3.x × 69
mysql × 38
php × 22
component × 15
jdatabase × 14
development × 12
module × 11
joomla-2.5 × 10
joomla-4.x × 10
sql × 10
custom-component × 9
phpmyadmin × 9
articles × 8
user × 8
joomla-api × 8
tags × 8
installation × 8
joomla-3.4 × 6
form × 6
joomla-3.6 × 6
update × 6
jtable × 6
plugin × 5
extensions × 5