How can I compare two variable to an id table value in a query?
<pre><code>switch($_GET["action"])
  {
   case "add_item":
  {
    AddItem($_GET["ids"], $_GET["qty"]);
    ShowCart();
    break;
  }
default:
 {
   ShowCart();
 }

function AddItem($itemId, $qty){


   $result = mysql_query("SELECT COUNT(*) FROM cart WHERE cookieId = '" . GetCartId() . "' AND id = $itemId");

  $row = mysql_fetch_row($result);
  $numRows = $row[0];

if($numRows == 0)
{
</code></pre>

<p>Can you see the AddItem Switch and case function I want to add $_POST["idc"] just like below.</p>

<pre><code>AddItem($_GET["ids"], $_POST["idc"], $_GET["qty"]);       
</code></pre>

<p>Then in the function AddItem below the AddItem function inside the Switch function I will need to add another argument since there are three inside the Switch function. $itemId, $itemIdII and $qty   </p>

<pre><code>function AddItem($itemId, $itemIdII, $qty){ 

}
</code></pre>

<p>Notice that I have added $itemIdII to the AddItem function since I have added ,$_POST["idc"] in the Switch function. </p>

<p>Now the question</p>

<p>How can I compare $itemId and $itemIdII to the id in the query? Right now its like </p>

<pre><code>  AND id=$itemId
</code></pre>

<p>But how could I add $itemIdII to the query to compare it.</p>

<pre><code>  AND id=$itemId OR $itemIdII     
</code></pre>

<p>Thanks!</p>
