This is what I have so far:
<?php
$conexion = mysql_connect("localhost","root","root");
mysql_select_db("dejavu");
mysql_query("SET NAMES 'utf8'");
$consulta_año_emision = "SELECT `año_emision` FROM `serie` ORDER BY `año_emision` DESC LIMIT 1";
$resultado_año_emision = mysql_query($consulta_año_emision);
?>
<select>
<?php
$año_actual = date("Y");
for($año = $resultado_año_emision['año_emision']; $año <= $año_actual; $año++){ ?>
<option value="<?php echo $año; ?>"><?php echo $año; ?></option>
<?php } ?>
What i'm trying to acomplish is a select that contains all the years between this year (2013), and the lowest year saved in the field 'año_emision' on my database. What that's returning is all numbers between 1 and 2013, clearly not what I need. Anyone knows how to fix this?