質問

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