PHP / MySQL:来自不同列的SQL语句

i have an behaviour where I am confused how I can solve this...

I have a table "favcolor" there are 4 columns with the name "pot1", "pot2", "pot3", "pot4". In this columns are the ID of a drink.

When I select in the "selectbox1" ("limonade") the drink: Energy / value="5". In "selectbox2" ("limonade2") I select the drink: Mezzo / value="3". It generate this SQL statement:

 "SELECT * FROM favcolor WHERE pot1= 5 AND pot2= 3" - i get 15 hits.

Now I select in the "selectbox1" ("limonade") the drink: Mezzo / value="3". And in "selectbox2" ("limonade2") I select the drink: Energy/ value="5". Now this SQL statement is generated:

 "SELECT * FROM favcolor WHERE pot1= 3 AND pot2= 5" - i get 7 hits.

But I try to find a solution that i get all hits where "Energy" and "Mezzo" exists, regardless of whether they appear in Pot1, Pot2, Pot3 or Pot4.

I hope you can help me to find a solution for this "issue".

For better understanding here is my current code:

<form method="post"action="./usercolor.php">

<input type="checkbox" id="colorred" name="colorred" value="1"/>red</td>
<input type="checkbox" id="colorblue" name="colorblue" value="1"/>blue</td>
<input type="checkbox" id="coloryellow" name="coloryellow" value="1"/>yellow</td>
<input type="checkbox" id="colorgreen" name="colorgreen" value="1"/>green</td>
<input type="checkbox" id="colorblack" name="colorblack" value="1"/>black</td>

</select name="limonade">
    <option value="1">Cola</option>
    <option value="2">Fanta</option>
    <option value="3">Mezzo</option>
    <option value="4">Sprite</option>
    <option value="5">Energy</option>
</select>
</select name="limonade2">
    <option value="1">Cola</option>
    <option value="2">Fanta</option>
    <option value="3">Mezzo</option>
    <option value="4">Sprite</option>
    <option value="5">Energy</option>
</select>
</select name="limonade3">
    <option value="1">Cola</option>
    <option value="2">Fanta</option>
    <option value="3">Mezzo</option>
    <option value="4">Sprite</option>
    <option value="5">Energy</option>
</select>
</select name="limonade4">
    <option value="1">Cola</option>
    <option value="2">Fanta</option>
    <option value="3">Mezzo</option>
    <option value="4">Sprite</option>
    <option value="5">Energy</option>
</select>

<input type="submit" value="SEARCH"/>

</form>

The PHP code:

$whereArr = Array();
if (isset($_POST["colorred"]) && $_POST["colorred"]==1) $whereArr[] = "red=1";
if (isset($_POST["colorblue"]) && $_POST["colorblue"]==1) $whereArr[] = "blue=1";
if (isset($_POST["colorgreen"]) && $_POST["colorgreen"]==1) $whereArr[] = "green=1";
if (isset($_POST["coloryellow"]) && $_POST["coloryellow"]==1) $whereArr[] = "yellow=1";
if (isset($_POST["colorblack"]) && $_POST["colorblack"]==1) $whereArr[] = "black=1";


$sql = "SELECT * FROM favcolor WHERE " . implode(" AND ", $whereArr);


if (empty($whereArr)) {  
    if( $_POST["limonade"] > 0 ) $sql .= ' pot1 = ' . $_POST["limonade"];
    if( $_POST["limonade2"] > 0 ) $sql .= ' pot2 = ' . $_POST["limonade2"];
    if( $_POST["limonade3"] > 0 ) $sql .= ' pot3 = ' . $_POST["limonade3"];
    if( $_POST["limonade4"] > 0 ) $sql .= ' pot4 = ' . $_POST["limonade4"];  
}
else {  
    if( $_POST["limonade"] > 0 ) $sql .= ' and pot1 = ' . $_POST["limonade"];
    if( $_POST["limonade2"] > 0 ) $sql .= ' and pot2 = ' . $_POST["limonade2"];
    if( $_POST["limonade3"] > 0 ) $sql .= ' and pot3 = ' . $_POST["limonade3"];
    if( $_POST["limonade4"] > 0 ) $sql .= ' and pot4 = ' . $_POST["limonade4"];  
}

The table:

 User   |Red    |Blue   |Yellow |Green  |Black
 Klaus  |0      |1      |1      |0      |0
 Jessy  |1      |0      |1      |0      |1 
 Andy   |1      |1      |0      |0      |0 
 Alex   |0      |0      |0      |1      |1 
 Denis  |1      |1      |0      |0      |1

You are trying to get drinks wich are either "Energy" OR "Mezzo":

$limonades = array():
if( $_POST["limonade"] > 0 ) $limonades['pot1'] = $_POST["limonade"];
if( $_POST["limonade2"] > 0 ) $limonades['pot2'] = $_POST["limonade2"];
if( $_POST["limonade3"] > 0 ) $limonades['pot3'] = $_POST["limonade3"];
if( $_POST["limonade4"] > 0 ) $limonades['pot4'] = $_POST["limonade4"];
if(!empty($limonades)) {
    if (!empty($whereArr))
        $sql .= ' and ';
    $sql .= '(';
    $keys = array_keys($limonades);
    for($i = 0; $i < count($limonades); $i++) {
        if($i == 0)
            $sql .= $keys[$i].' = '. $limonades[$keys[$i]];
        elseif($i == count($limonades) - 1)
            $sql .= ')';
        else
            $sql .= ' OR '.$keys[$i].' = '. $limonades[$keys[$i]];
    } 

}