hi am trying to group result by 3, am not talking about the normal group by but something like this
1 a
2 a
3 b
4 c
5 a
6 b
7 a
8 a
9 c
10 c
11 b
12 b
it should be
1 a
2 a
5 a
3 b
6 b
11 b
4 c
9 c
10 c
hope u understand
this my code below
$query = "SELECT a.*, ca.cat_name, ca.cat_id, ca.cat_image, s.team_id, s.team_image AS teamsimg1, s.teams AS teams1, ss.team_id, ss.team_image AS teamsimg2, ss.teams AS teams2 from " . $DBPrefix . "auctions a
LEFT JOIN " . $DBPrefix . "sports s ON (s.team_id = a.team1)
LEFT JOIN " . $DBPrefix . "sports ss ON (ss.team_id = a.team2)
LEFT JOIN " . $DBPrefix . "categories ca ON (ca.cat_id = a.category)
WHERE closed = 0 AND suspended = 0 AND starts <= :time
AND featured = 1
AND soccermatch = 1
AND category != '199'
AND category != '200'
ORDER BY starts DESC
LIMIT 20
thansk alot