title: Records exists but not found by query
body: <p>I'm making a query to my database, but the query always return empty. If I copy the query and paste it directly to mysql, it show one record, as it should be.
  This is my query in php:</p>
  <pre><code>$sql = &quot;SELECT * FROM disponibilities WHERE st_week = '&quot; . 
  $st_week . &quot;' AND en_week = '&quot; . $en_week . &quot;' AND boat = '&quot; . 
  $_POST['boat'] . &quot;'&quot;;
  $result = mysqli_query($conn, $sql);
  if (mysqli_num_rows($result) &gt; 0) {
      // output data of each row
      while ($row = mysqli_fetch_assoc($result)) {
          $disponibility = $row;
      }
  } else {
      echo &quot;0&quot;;
      echo $_POST['boat'];
  }
  </code></pre>
  <p>And this is the query (echo of the previous query) that show one record if used in phpmyadmin:</p>
  <pre><code>SELECT * FROM disponibilities WHERE st_week = '2021-11-13' AND en_week = '2021-11-20' AND boat = 'sapphire'
  </code></pre>
  <p>I've tried converting the date in this way, but still don't work</p>
  <pre><code>$sql= &quot;SELECT * FROM disponibilities WHERE st_week = 
  STR_TO_DATE('$st_week','%Y-%m-%d') AND en_week = STR_TO_DATE('$en_week','%Y-%m-%d')&quot;;
  </code></pre>
  <p>EDIT:
  this is my phpmyadmin query response:
  <a href="https://i.stack.imgur.com/qDfOq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qDfOq.png" alt="enter image description here" /></a></p>
  <p>Thanks in advance</p>