Article View: chile.comp.programacion
Article #2919Obtener ID despues de una insercion (PHP+MySQL)
From: Chano
Date: Wed, 20 Jul 2005 18:44
Date: Wed, 20 Jul 2005 18:44
8 lines
1366 bytes
1366 bytes
Necesito insertar datos en una tabla, que tiene un campo ID integer con autoincremento. Al insertar los datos, me gustar๏ฟฝa poder recuperar el ID del campo insertado, de manera de poder usarlo en otras tablas. Hay forma de recuperarlo sin tener que realizar otra consulta? -- Chano jgarrido[@]dcc.uchile.cl
Technical Details
Message-ID:
<dbm61n$rdd$5@localhost.localdomain>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!news.cec.uchile.cl!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6e6fc2fd18ca8644,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!news.cec.uchile.cl!not-for-mail
From: Chano <jgarrido@dcc.uchile.NOSPAM.cl>
Newsgroups: chile.comp.programacion
Subject: Obtener ID despues de una insercion (PHP+MySQL)
Date: Wed, 20 Jul 2005 18:44:08 +0000 (UTC)
Organization: Chano Records Inc.
Lines: 8
Sender: Jose Miguel Garrido Urzua <jgarrido@cipres.cec.uchile.cl>
Distribution: world
Message-ID: <dbm61n$rdd$5@localhost.localdomain>
NNTP-Posting-Host: cipres.cec.uchile.cl
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: localhost.localdomain 1121885048 28077 200.9.100.5 (20 Jul 2005 18:44:08 GMT)
X-Complaints-To: news@localhost.localdomain
NNTP-Posting-Date: Wed, 20 Jul 2005 18:44:08 +0000 (UTC)
X-Nick: Chano
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))