Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Get the most similar records


i have an array with data, which is stored in a database table field searchField


Now i will search in different tables after these data

    SELECT, cars.model, country.nation WHERE LIKE %JOHN% OR 
    cars.model LIKE %BMW% OR 
    country.nation LIKE %Germany%;

What is the best way to realize this?


Do you have a single table or are they 3 tables?


Hi Denzyl,

9 tables, this is just a short example.


I will use joins. It go like this:

 SELECT, cars.model, country.nation
 JOIN cars ON cars.user_id =
 JOIN country ON country.user_id =
 WHERE LIKE %JHON%  OR country.model LIKE %BMW% OR country.nation LIKE%Germany%


i will reply asap, i have to check this next year :-)

Best to you for 2017.