Commit a958010c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix query for MySQL


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 1fc9e978
......@@ -295,7 +295,7 @@ function user_statistics($limit, $offset, &$sitedata) {
$data['strmaxfriends'] = get_string('statsnofriends', 'admin');
}
$maxviews = get_records_sql_array("
SELECT u.id, u.firstname, u.lastname, u.preferredname, COUNT(v.*) AS views
SELECT u.id, u.firstname, u.lastname, u.preferredname, COUNT(v.id) AS views
FROM {usr} u JOIN {view} v ON u.id = v.owner
WHERE owner <> 0
GROUP BY u.id, u.firstname, u.lastname, u.preferredname
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment