Hi, I am playing a bit on a local install of Q2A (latest version) and have problem with the function qa_db_single_select from qa-db.php
I am basicly trying to implement an example submitted several time here, which is about returning in the sidebar the most active users. It is failing at:
foreach ($selectspec['columns'] as $columnas => $columnfrom) on qa-db with the following error:
"Warning: Invalid argument supplied for foreach() on line...(above line) ... SELEC FROM Error 1064: You have an error in your SQL syntax;..."
My qa-theme.php uses the following function (copied from another post):
function sidebar()
{
global $qa_db;
qa_html_theme_base::sidebar();
$users=qa_db_single_select($qa_db, qa_db_top_users_selectspec(0));
echo "Most active";
foreach (array_slice($users,0,10) as $user)
$this->output('<P>'.qa_get_one_user_html($user['handle'], false).
' ('.number_format($user['points']).')</P>');
}
Any idea?