Error: Class name must be a valid object or a string (0)
#0/public_html/system/Theme/Dev/Template.php(171): IPS\Theme\theme_core_front_tables_rows(Object(IPS\Helpers\Table\Db), Array, Array)
#1 /public_html/system/Theme/Theme.php(4625) : eval()'d code(513): IPS\Theme\Dev\_Template->__call('rows', Array)
#2 /public_html/system/Theme/Dev/Template.php(171): IPS\Theme\theme_core_front_tables_table(Object(IPS\Helpers\Table\Db), Array, Array, NULL, false)
#3 /public_html/system/Helpers/Table/Table.php(579): IPS\Theme\Dev\_Template->__call('table', Array)
#4 /public_html/system/Theme/Theme.php(4625) : eval()'d code(422): IPS\Helpers\Table\_Table->__toString()
#5 /public_html/system/Theme/Dev/Template.php(171): IPS\Theme\theme_core_front_global_globalTemplate(' - Invision Com...', Object(IPS\Helpers\Table\Db), Array)
#6 /public_html/system/Dispatcher/Dispatcher.php(173): IPS\Theme\Dev\_Template->__call('globalTemplate', Array)
#7 /public_html/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish()
#8 /public_html/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish()
#9 /public_html/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish()
#10 /public_html/index.php(13): IPS\_Dispatcher->run()
#11 {main}
I probably have an incorrectly connected external database in $table
$connection = \IPS\Db::i( 'external', array(
'sql_host' => 'localhost',
'sql_user' => 'username',
'sql_pass' => 'password',
'sql_database' => 'database_name',
'sql_port' => 3306,
'sql_socket' => '/var/lib/mysql.sock',
'sql_utf8mb4' => true,
) );
$database = \IPS\Db::i('external');
$tablee = 'table_db';
$baseUrl = \IPS\Http\Url::internal( 'app=test&module=test&controller=test' );
$table = new \IPS\Helpers\Table\Db($tablee, $baseUrl, NULL, NULL, $database);
$table->include = array( 'id', 'id_name' );
\IPS\Output::i()->output = $table;