title: PDO SELECT [and - or]
body: <p>I have a table: product</p>
  
  <pre><code>---- id ---- send ---- get ----
  
  ---- 1 ----- jack ----- sedo ----
  
  ---- 2 ----- jack ----- imam ----
  
  ---- 3 ----- imam ----- sedo ----
  
  ---- 4 ----- imam----- jack----
  </code></pre>
  
  <p>I would like to select from product with PDO PREPARE</p>
  
  <pre><code>where (send = imam AND get = jack) OR (send = jack AND get = imam)
  </code></pre>
  
  <p>This seems not working at all.</p>
  
  <pre><code>$query=$db-&gt;prepare("SELECT * FROM product WHERE (send = :send AND get = :get) OR (get = :get AND send = :send)");
  $query-&gt;execute(array(
      ':send'         =&gt; "imam",
      ':get'          =&gt; "jack",
      ':send'         =&gt; "jack",
      ':get'          =&gt; "imam",
      )
  );
  </code></pre>
  
  <p>How can i do this query ? thanks</p>