2018-01-01, 06:34 PM
I have an error in my where clause. Trying to count posts made by x usergroup for community advancements program.
Unsure of why the where clause is incorrect because from all my reading that’s how you dictate which usergroup. Anyone know why this could be happening?
ERROR MESSAGE:
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE usergroup = 4' at line 1
Query:
SELECT COUNT(*) AS postsnumbers FROM mybbvo_users u LEFT JOIN mybbvo_posts WHERE usergroup = 4
Please contact the MyBB Group for technical support.
Unsure of why the where clause is incorrect because from all my reading that’s how you dictate which usergroup. Anyone know why this could be happening?
$count = $db->query('SELECT COUNT(*) AS postsnumbers FROM '.TABLE_PREFIX.'users u LEFT JOIN '.TABLE_PREFIX.'posts WHERE usergroup = 4');
ERROR MESSAGE:
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE usergroup = 4' at line 1
Query:
SELECT COUNT(*) AS postsnumbers FROM mybbvo_users u LEFT JOIN mybbvo_posts WHERE usergroup = 4
Please contact the MyBB Group for technical support.