phpbar.de logo

Mailinglisten-Archive

RE: last Record
Archiv Mailingliste mysql-de

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: last Record



Title: RE: last Record

Hi,

           LAST_INSERT_ID()

In der (Online-)Doku (www.mysql.com) im Kapitel

22.4.54 How can I get the unique ID for the last inserted row?

INSERT INTO foo (auto,text)
    VALUES(NULL,'text');              # generate ID by inserting NULL
INSERT INTO foo2 (id,text)
    VALUES(LAST_INSERT_ID(),'text');  # use ID in second table



HTH

MfG
Martin Knauer


Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive