tableName}` WHERE events_id={$eventsId} GROUP BY uid "; if($limit){ $sql = "SELECT uid,create_time FROM `{$this->tableName}` WHERE events_id={$eventsId} GROUP BY uid limit {$limit} "; } $tmpResult = $this->db->fetchAll($sql); if (!$tmpResult) { return array(); } return $tmpResult; } public function getUserParticipateLogNumGroupByUid($eventsId){ $returnNum = 0; $sql = "SELECT count(uid) FROM `{$this->tableName}` WHERE events_id={$eventsId} GROUP BY uid "; $tmpResult = $this->db->fetchAll($sql); if (!$tmpResult) { return $returnNum; } return count($tmpResult); } }