ok, this is the error (I turned debug back on for everyone this time
Critical error
There was an error while processing a database query.
While executing query 'SELECT real_name AS user_name, COUNT(*) as num_comments FROM `thefanta_attic`.smf8_members AS u INNER JOIN cpg14x_comments AS c ON c.author_id = u.id_member WHERE group_id != 19 GROUP BY user_name HAVING num_comments >= 25 ORDER BY num_comments DESC' in top-comments.php on line 7 mySQL error: Unknown column 'group_id' in 'where clause'
File: attic/cpg/include/functions.inc.php - Line: 272
using this code
<?php
$min_comments = 25;
define('IN_COPPERMINE', true);
require('include/init.inc.php');
$result = cpg_db_query("SELECT ".$cpg_udb->field['username']." AS user_name, COUNT(*) as num_comments FROM ".$cpg_udb->usertable." AS u INNER JOIN {$CONFIG['TABLE_COMMENTS']} AS c ON c.author_id = u.".$cpg_udb->field['user_id']." WHERE group_id != 19 GROUP BY user_name HAVING num_comments >= $min_comments ORDER BY num_comments DESC");pageheader();
starttable();
echo "<tr><td><strong>User name</strong></td><td><strong>Comments</strong></td></tr>";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr><td>{$row['user_name']}</td><td>{$row['num_comments']}</td></tr>";
}
endtable();
pagefooter();
after changing to u.group_id the error is:
While executing query 'SELECT real_name AS user_name, COUNT(*) as num_comments FROM `thefanta_attic`.smf8_members AS u INNER JOIN cpg14x_comments AS c ON c.author_id = u.id_member WHERE u.group_id != 19 GROUP BY user_name HAVING num_comments >= 25 ORDER BY num_comments DESC' in top-comments.php on line 7
mySQL error: Unknown column 'u.group_id' in 'where clause'