No consigo que me funcione el cast simepre me pone You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'int) from capacidad' at line 1
El sql es
$consulta = mysql_query("SELECT * FROM $tabla order by cast(nombre AS int)") or die(mysql_error());
Un Saludo