$result = mysql_query("select * from niveles_optimos where Id_cliente = '$var_id' order by fecha_y_hora desc limit 1");