Error in executing SELECT count (wid) AS `totalwords` FROM `wordflags` `wf` INNER JOIN `chars` `c` ON `wf`.`wid` = `c`.`id` AND `wf`.`type` = 1 WHERE `wf`.`flag` = 5 AND `c`.`status` !=2 AND `c`.`offensive` = 0 UNION SELECT count (wid) AS `totalwords` FROM `wordflags` `wf` INNER JOIN `words` `w` ON `wf`.`wid` = `w`.`id` AND `wf`.`type` = 0 WHERE `wf`.`flag` = 5 AND `w`.`status` !=2 AND `w`.`offensive` = 0 stmt
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 '(wid) AS `totalwords` FROM `wordflags` `wf` INNER JOIN `chars` `c` ON `wf`.`' at line 1