match any or all parts of an array to mysql
<p>I have an exploded search string, and I need to see if any or all parts of it match an entry in a mysql DB table.</p>

<p>If user searches for something like "pour house greensboro", then "pour house" would match an entry in the table. But the search could also be "$1 beer pour house greensboro, or anything else like that, and in any order, so I need to put each part of the search string together and check to see if it matches what's in the DB</p>

<p>so, if the parts of the exploded string are just numbers, then I need to check it like this: <br>
0 + 1 + 2 + 3 + 4<br>
0 + 1 + 2 + 3<br>
0 + 1 + 2<br>
0 + 1<br>
0<br>
1 + 2 + 3 + 4<br>
1 + 2 + 3<br>
1 + 2<br>
1<br>
2 + 3 + 4<br>
2 + 3<br>
2<br>
3 + 4<br>
3<br>
4<br></p>

<p>there could be more or less than 5 parts of the string</p>

<p>is there any way to do this easily?</p>
