Sign up |
Can I have multiple search form fields search the same listing field using an AND operator?
-> this will display all listings with "Sony" AND "HD" in the product field.
Will this work or should I be doing this some other way?
Yes, that's what it will do by default so that should work no problem.
Let me know if you have any other questions.
Thanks for getting back to me. That's great!
And if I want to use an OR operator then I would do this:
Is that right?
Yes, that's right. And if you want to see the actual MySQL that is being generated for debugging purposes you can add the option:
'debugSql' => true,
Hope that helps!
That's useful to know, thanks.
Also, can you clarify what the difference is (if any) between:
Taking a stab at it, I think product_keyword=HD would find HDMI whereas product=HD would not find it?
Would product=HD and product_match=HD be the same query?
Yea, that's right. *_keyword matches if the keyword is anywhere in the value. Otherwise, it needs to be an exact match.