Commit f61a0d1a authored by Penny Leach's avatar Penny Leach
Browse files

mysql support: mysql doesn't like count(v.*) AS syntax

(getcommunities.json.php)
parent fd3aa6a8
......@@ -52,7 +52,7 @@ else {
$count = count_records_sql('SELECT COUNT(*) FROM ' . $prefix . 'community c WHERE c.owner = ?',
array($userid));
$datasql = 'SELECT c.id,c.jointype,c.name,c.owner,count(cmr.community) as requestcount, COUNT(v.*) AS hasviews
$datasql = 'SELECT c.id,c.jointype,c.name,c.owner,count(cmr.community) as requestcount, COUNT(v.view) AS hasviews
FROM ' . $prefix . 'community c
LEFT JOIN ' . $prefix . 'community_member_request cmr ON cmr.community = c.id
LEFT JOIN ' . $prefix . 'view_access_community v ON v.community = c.id
......
Supports Markdown
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