title: MySQL Filter JSON_CONTAINS Any value from Array
body: <p>I have a JSON field in a MySQL database that contains values like <code>[1,3,4,7]</code>.  I would like to be able to easily supply another array from a PHP variable and determine if there is any overlap.  I know this example does not work, but this is what I am trying to do:</p>
  
  <pre><code>$DaysVar = $_GET['Days']; --Example is [1,5,8]
  
  $sql = mysqli_query($db, "
      SELECT ScheduleID, 
             Days --Example is [1,3,4,7]
      FROM Schedule
      WHERE JSON_CONTAINS(Days, '$DaysVar')
  ");
  </code></pre>
  
  <p>How can I get this query to return a result since there is a 1 in each array?</p>