Wie zeige ich Ergebnis durch SELECT ... WHERE LIKE
mit Wortfeld an?MySQL WHERE LIKE durch Wort mit Komma
Ich habe dieses SELECT * FROM tbl_question WHERE word LIKE '%How are you?%'
versucht, aber es funktioniert nicht.
tbl_question
+-------------+-------------------+------------+
| question_id | question | word |
+-------------+-------------------+------------+
| 1 | How are you? | How |
| 2 | What's your name? | What, name |
| 3 | Hi there! | Hi |
| 4 | Hi, How are you? | Hi, How |
+-------------+-------------------+------------+
Beispiel: Wenn ich "How are you?"
suchen, werden Sie Ergebnisse von zwei Zeilen wie angezeigt:
+-------------+-------------------+------------+
| question_id | question | word |
+-------------+-------------------+------------+
| 1 | How are you? | How |
| 4 | Hi, How are you? | Hi, How |
+-------------+-------------------+------------+
oder wenn ich "Your name is?"
es führen angezeigt wird wie:
+-------------+-------------------+------------+
| question_id | question | word |
+-------------+-------------------+------------+
| 2 | What's your name? | What, name |
+-------------+-------------------+------------+
Siehe Normalisierung. – Strawberry