Cita:
Iniciado por abimaelrc
Hazle caso a
jam1138 que debes arreglar la base de datos para que solo llames en un futuro el ultimo caso asi como tu mencionaste
$sql="SELECT * FROM comprobante_egreso ORDER BY ib_comprobante DESC LIMIT 1";
Por tu culpa
el_cesar me regañaron

jajajaja, suelo causar ese efecto,


mentiras ahora si en serio a que se refieren con arreglar la base de datos,
esta es la estructura que tengo
Cita: -- Estructura de tabla para la tabla `comprobante_egreso`
--
CREATE TABLE `comprobante_egreso` (
`ib_comprobante` varchar(5) NOT NULL,
`ciudad` text NOT NULL,
`fecha` date NOT NULL,
`valor` int(11) NOT NULL,
`pagado_a` text NOT NULL,
`concepto` text NOT NULL,
`suma_letras` text NOT NULL,
`efectivo` int(11) NOT NULL,
`cheque` text NOT NULL,
`banco` text NOT NULL,
`sucursal` text NOT NULL,
`elaboro` text NOT NULL,
PRIMARY KEY (`ib_comprobante`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
y ahi me perdonas por lo del "regaño" jeje