title: Mysql SELECT WHERE id = ? AND url = 1, 0 or all
body: <p>I have a system in which show messages, but the user has the option to see positive (1) and negative (0) messages, but also has a link where you can see all messages (1 and 0) and I can do this query?</p>
  
  <p><strong>index.php?id=1&amp;url=1</strong></p>
  
  <pre><code>&lt;?php 
  function mesage($id, $url) {
  $db = DB::getInstance();
  $query = $db-&gt;query("SELECT * FROM mesage WHERE id = ? AND url = ?", array($id, $url));
  $results = $query-&gt;results();
  return ($results);
  }
  
  $url = isset($_GET["url"])?$_GET["url"]:'Select 0 and 1';
  $id = $_GET['id'];
  $getmesaje = mesage($id, $url);
  ?&gt;
  </code></pre>
  
  <p>As I can change the word "<code>Select 0 and 1</code>" in the variable "<code>$url</code>" to show all?</p>