Error: 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 'aLIMIT 0, 12' at line 1
in query: "SELECT `profile`.*, `online`.`hash` AS `online`, SUM(`rate`.`score`)/COUNT(`rate`.`profile_id`) AS `score` FROM `skadate_profile` AS `profile` LEFT JOIN `skadate_profile_online` AS `online` USING( `profile_id` ) LEFT JOIN `skadate_profile_rate` AS `rate` ON `profile`.`profile_id`=`rate`.`profile_id` AND ( `profile`.`status`='active' ) GROUP BY `profile`.`profile_id` ORDER BY `score` DESC aLIMIT 0, 12"

debug string: ""