So I've been trying to follow the example here: http://xenforo.com/community/threads/quick-easy-dirty-pages-with-sql-database-query-results.62865/
My file is in Library/TwitchStream/test.php which contains
My page contains this in the HTML
And php callback is TwitchStream::testQuery
There is 1 entry currently there and through phpmyadmin the query works. But when I goto the page, I get nothing. Ideas?
My file is in Library/TwitchStream/test.php which contains
PHP:
<?php
class TwitchStream_test
{
public static function testQuery(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract &$response)
{
$mydb = XenForo_Application::get('db');
$testQuery = $mydb->fetchAll("
SELECT 'field_value'
FROM `xf_user_field_value`
WHERE `field_id` = 747769746368");
$response->params['testQuery'] = $testQuery;
}
}
My page contains this in the HTML
HTML:
<xen:foreach loop="$testQuery" value="$testQuery">
{$testQuery.field_value}
<br />
</xen:foreach>
And php callback is TwitchStream::testQuery
There is 1 entry currently there and through phpmyadmin the query works. But when I goto the page, I get nothing. Ideas?