0
I have a table in the database, with columns id
, assunto
, mensagem
, id_replicante
I want to select all records from this table.
But in the field assunto
has several repeating values, and I would like my selection to take only 1 of these repeating.
Example:
On the table:
(1, assunto1, mensagem1, 2)
(2, assunto1, mensagem2, 3)
(3, assunto2, mensagem3, 4)
(4, assunto3, mendagem4, 4)
SELECT * FROM tabela WHERE...
I’d like to keep it that way:
subject 1, subject 2, event3,
Regardless of being a beginner in PHP, it would be good to express yourself better, because you can understand in a diversity of ways your question. Read on [Ask], and try to be clearer. You can [Edit] the answer, and add more details to increase the chance of an answer that solves your problem.
– Bacco
Probably with
GROUP BY
you solve the problem.– Franchesco