问题
I have this table table chats
and tbl_suggested
. On table chats i have
id questions answer date
1 What is life 2020-02-08
2 what is PC personal computer 2020-02-08
3 What is life uk good 2020-02-08
4 where is the cr there 2020-02-08
On the tbl_suggest
i have this
id chats_id questions
1 1 What is life in spain
2 1 what is liefe in uk
3 1 What is life in paris
I query this code
SELECT chats.id,chats.question,chats.answer,tbl_suggest.questions,chats.date
from chats LEFT JOIN tbl_suggest on chats.id= tbl_suggest.chats_id O
RDER by chats.date ASC
result is, then i want to remove that two what is life question on the second and third row
chat.id chat.questions chat.answer tbl_suggest.question chats.date
1 what is life what is life in spain 2020-02-08
1 what is life what is liefe in uk 2020-02-08
1 what is life what is life in paris 2020-02-08
2 what is PC personal computer 2020-02-08
3 What is life uk good 2020-02-08
4 where is the cr there 2020-02-08
I want is to remove the what is life redudant like this
chat.questions chat.answer tbl_suggest.question chats.date
what is life what is life in spain 2020-02-08
what is liefe in uk 2020-02-08
what is life in paris 2020-02-08
what is PC personal computer 2020-02-08
What is life uk good 2020-02-08
where is the cr there 2020-02-08
to show it properly in my dialog box
来源:https://stackoverflow.com/questions/60128664/having-a-problem-in-database-selection-mysql