|
Yo lo que hago es una funcion en mysql que me da el nro factura y lo incrementa, asi no hay problemas.
supongamos que tenemos la tabla numeros y facturas. En mysql define una funcion asi
begin
define n int;
select nrofactura into n from numeros limit 1;
update numeros set nrofactura = nrofactura + 1;
return n;
end
en return type pon int
|