Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/07/2018, 11:44
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 10 meses
Puntos: 379
Respuesta: i++ en php y mysql

No necesitas hacer eso, con que no pongas el campo en el inser todo ira bien
Código SQL:
Ver original
  1. CREATE TABLE animals (
  2.      id MEDIUMINT NOT NULL AUTO_INCREMENT,
  3.      name CHAR(30) NOT NULL,
  4.      PRIMARY KEY (id)
  5. );
  6.  
  7. INSERT INTO animals (name) VALUES
  8.     ('dog'),('cat'),('penguin'),
  9.     ('lax'),('whale'),('ostrich');
  10.  
  11. SELECT * FROM animals;
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.