Re: Auto increment en MySQL
| From: | Xavi Navarro | Date: | Mon, 16 Jul 2001 13:17:38 +0000 |
| Subject: | Re: Auto increment en MySQL | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-12289@lists.php.net to get a copy of this message | ||
Ponle otro nombre, no le llames "id". A mí me pasó lo mismo hasta que le cambié el nombre al campo. Debe ser palabra reservada.
Saludos.
--
Xavier Navarro (xnavarroNOSPAM@mail.com)
Girona - Spain
Linux User - 141897
Linux Machine - 81956
At Monday 16/7/01 14.20, you wrote:
Quiero crear una tabla desde PHP y que el campo ID sea autoincrementable, he mirado como lo hace el MySQL y lo hace así: CREATE TABLE TABLA (id INT NOT NULL AUTO_INCREMENT, fecha CHAR (10), titulo CHAR (255), texto TEXT ) Peró si lo pongo así en PHP no funciona, si quito el AUTO_INCREMENT si que me crea al Tabla. ¿Cuál puede ser el error? --------------------------------------------------------------------- Archivo On-line: http://www.phpes.com/ Manual PHP en español: http://www.php.net/manual/es/ Para dar de baja la suscripción, mande un mensaje a: lista-unsubscribe@phpes.com