Code Duplication    Length = 7-7 lines in 3 locations

modules/random_member.php 3 locations

@@ 80-86 (lines=7) @@
77
	{
78
		switch ($this->db->get_sql_layer())
79
		{
80
			case 'postgres':
81
			$sql = 'SELECT *
82
				FROM ' . USERS_TABLE . '
83
				WHERE user_type <> ' . USER_IGNORE . '
84
				AND user_type <> ' . USER_INACTIVE . '
85
				ORDER BY RANDOM()';
86
			break;
87
88
			case 'mssql':
89
			case 'mssql_odbc':
@@ 89-95 (lines=7) @@
86
			break;
87
88
			case 'mssql':
89
			case 'mssql_odbc':
90
			$sql = 'SELECT *
91
				FROM ' . USERS_TABLE . '
92
				WHERE user_type <> ' . USER_IGNORE . '
93
				AND user_type <> ' . USER_INACTIVE . '
94
				ORDER BY NEWID()';
95
			break;
96
97
			default:
98
			$sql = 'SELECT *
@@ 97-103 (lines=7) @@
94
				ORDER BY NEWID()';
95
			break;
96
97
			default:
98
			$sql = 'SELECT *
99
				FROM ' . USERS_TABLE . '
100
				WHERE user_type <> ' . USER_IGNORE . '
101
				AND user_type <> ' . USER_INACTIVE . '
102
				ORDER BY RAND()';
103
			break;
104
		}
105
106
		$result = $this->db->sql_query_limit($sql, 1);