0
I have a problem with my query
in Mysql:
SELECT
*
FROM `campeonatos`
INNER JOIN `jogos`
ON `campeonatos`.`camp_id`=`jogos`.`campeonato_id`
WHERE `jogos`.`inicio` > "2017-10-30 00:00:00"
ORDER BY `campeonatos`.`camp_nome` ASC
The problem it groups and only returns the first record. I would like him to group for the championship and return something more or less like this:
Campeonato : 888
São Paulo x Flamengo
São Paulo x Flamengo
Campeonato 889
São Paulo x Flamengo
São Paulo x Flamengo
You can post the
group by
tempted?– Jefferson Quesado
Lucas to group, you have to use the
GROUP BY
... But to help better, post the creation script and data: http:/sqlfiddle.com/– rbz
@Jeffersonquesado http://sqlfiddle.com/#! 9/33932e/1
– Lucas Sandes