Answer the question
In order to leave comments, you need to log in
How to make a request to the database and output to the Joomla 3 site?
I'm trying to write my own simple module.
Through the component, the data enters the database: record number (number), record name (name), link to the record (link).
Everything goes well in the base, there are no questions.
But I can't bring it to the site, I don't have enough skills with php and mysql.
Here is what has already been done.
mod_pravinfo
<?php
defined('_JEXEC') or die;
require_once __DIR__ . '/helper.php';
$pravinfo = modPravinfoHelper::getPravinfo();
require JModuleHelper::getLayoutPath('mod_pravinfo', $params->get('layout', 'default'));
<?php
defined('_JEXEC') or die;
class modPravinfoHelper
{
public static function getPravinfo()
{
$app = JFactory::getApplication();
$db = JFactory::getDbo();
// собственно, на этом я и застрял, тут нужно писать запросы
}
}
<tr>
<td><span>Номер записи</span></td>
<td><span>Название записи</span></td>
<td><a href="#" target="_blank"><span>Ссылка на запись</span></a></td>
</tr>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question