title: MySql: select rows between two specific values:
body: <p>I have this table:</p>
  
  <p><a href="https://i.stack.imgur.com/bypuG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bypuG.png" alt="enter image description here"></a> </p>
  
  <p>and I'd like to select the rows between 'inizio_votazione1' e fine_votazione1'.</p>
  
  <p>I tried this code: </p>
  
  <pre><code>$sql  = "SELECT codice FROM scansioni WHERE codice BETWEEN 'inizio_votazione1' 
  AND 'fine_votazione1'";
  
  while ($row = $result-&gt;fetch_row()) {
  // print_r($row);
  
  $res = $row[0];
  echo $res;
  echo "&lt;br /&gt;";
  }
  </code></pre>
  
  <p>but I see no result.</p>
  
  <p>Which is the correct syntax to retrieve the desired result?
  Thanks</p>