look up mysql_insert_id() in the php documentation.  Check out the
documentation as it appears on the www.php.net site

http://www.php.net/manual/en/function.mysql-insert-id.php

hope that helps
George

-----Original Message-----
From: Zbigniew Szczesny [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 3:16 PM
To: [EMAIL PROTECTED]
Subject: How to know which row was affected with a querry ???


Hello !

I have a following problem while scripting MySQL with PHP4:

Imagine the user may add a record to a table. How can I know precisely what
was the number (auto increment primary key) given by MySQL to this new
inserted row ??? You may presume there are many simultaneus users adding
rows, so I need a accurate information.

Thank you for your kind help,
Ziggi

-----------------------------------------------------------------------------------------------------------------------------------------------
This e-mail may be privileged and/or confidential, and the sender does not waive any 
related rights and obligations. Any distribution, use or copying of this e-mail or the 
information it contains by other than an intended recipient is unauthorized. If you 
received this e-mail in error, please advise me (by return e-mail or otherwise) 
immediately. 

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et 
obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou 
des renseignements qu'il contient par une personne autre que le (les) destinataire(s) 
désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser 
immédiatement, par retour de courriel ou par un autre moyen. 


==============================================================================

Reply via email to