Вопрос

I'm writing a search engine and at the moment it searches for only the keywords that are submitted with a heap of other information. How can I ask it to look in other areas?

This is what I have:

$construct .= "keywords LIKE '%$search_each%'"; 

This is the coded theory of what I need to do:

$construct .= "keywords, name, description, id LIKE '%$search_each%'"; 

What is the formal way to add extra values to include?

Это было полезно?

Решение

I think what you are trying to do is this:

$construct .= "keywords LIKE '%$search_each%' OR name LIKE '%$search_each%' OR description LIKE '%$search_each%' OR id LIKE '%$search_each%'"; 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top