Jump to content


Issue information

  • #024831

  • Fixed

  • 2.2.2

  • 2.0.4

  • 0 - None Assigned


Issue Confirmations

  • Yes (0)No (0)
Photo

Top 10 submissions statistics not ordered

Posted by Martin A. on 15 August 2010 - 07:45 PM

They are ordered by submissions, but the query itself is ordered by the index file_submitter.

//-----------------------------------------
		// Top 10 submitters
		//-----------------------------------------
		
		$this->DB->build( array(
									'select'	=> 'COUNT(file_id) as submissions, MAX(file_id) as last_id, file_submitter',
									'from'		=> 'downloads_files',
									'group'		=> 'file_submitter',
									'limit'		=> array( 10 )
							)		);
Should be
//-----------------------------------------
		// Top 10 submitters
		//-----------------------------------------
		
		$this->DB->build( array(
									'select'	=> 'COUNT(file_id) as submissions, MAX(file_id) as last_id, file_submitter',
									'from'		=> 'downloads_files',
									'group'		=> 'file_submitter',
									'order'		=> 'submissions DESC',
									'limit'		=> array( 10 )
							)		);

Updating status to: Confirmed - Admin CP General

Not verified


Just to add some more clarifying information. The query is ordered by the member ID. So if you have 11 members on your board, and all of them have submissions, the 11th member will not be included no matter how many submissions him/her has.


Updating status to: Fixed
Updating severity to: 2 - Fair
Issue fixed in: 2.3.0 Beta 1






0 user(s) are reading this issue

0 members, 0 guests, 0 anonymous users