I used this tutorial to connect to a external database in my Joomla website.
I think that I managed to connect successfully to the database, but when I tried to use the data it returns an empty white page.
This is the code which I am using if the Table was in the joomla database:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('*'))
->from($db->quoteName('orders'))
->where($db->quoteName('manufacturer') . ' IS NOT NULL')
$db->setQuery($query);
$results = $db->loadObjectList();
echo '<table class="table table-striped">';
foreach ($results as $row)
{
echo '<tr>';
echo '<td class="first">'. $row->manufacturer .'</td>';
echo '<td>' . $row->type. '.</td>';
echo '<td>' . ($row->power+0) . ' kW</td>';
echo '<td>' . $row->rpm. ' мин.<sup>-1</sup></td>';
echo '</tr>';
}
echo '</table>';
How should I modify it, so I can have this simple table but from an external database?