Skip to content
Advertisement

How can I use a FULLTEXT query with MySQL to return all results matching a string?

This is the table videos: enter image description here

I currently have this query:

I want that query to return all results with the string not in it but it is only returning 1 result instead of 2.

What is the best way to get it to return all matching queries instead of only 1?


Edit1:

If I use the WITH QUERY EXPANSION modifier it does return 2 results but that is still not what I want because if the string changes to for example asd it also only returns 2 results instead the many more which are stored.

Edit2:

Query with LIKE:

Advertisement

Answer

This query seems to be doing what I want:

I don’t need the LEFT JOIN any more as I am no longer ordering by videoCheck.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement