Pregunta

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?

¿Fue útil?

Solución

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%'"; 
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top