I have this table:
and I'd like to select the rows between 'inizio_votazione1' e fine_votazione1'.
I tried this code:
$sql = "SELECT codice FROM scansioni WHERE codice BETWEEN 'inizio_votazione1'
AND 'fine_votazione1'";
while ($row = $result->fetch_row()) {
// print_r($row);
$res = $row[0];
echo $res;
echo "<br />";
}
but I see no result.
Which is the correct syntax to retrieve the desired result? Thanks

WHERE id BETWEEN 1 AND 9