You are here: getting ID field (autoinc) « MySQL Databases « IT news, forums, messages
getting ID field (autoinc)

Posted by Khai on 09/28/71 11:33

Let's say I have a table:

id (autoinc)
name_first (text)
name_last (text)

And let's say information is added with a php script on a web page.

Is it possible to do the Insert, then an immediate select of the ID?

My theory is - what happens if John Doe is inserted at the same time Jane
Dew is inserted? Will the script running for John have any chance of picking
the id up of Jane?

I had thought to just find the last row in the table, but - that could mean
computer cycles, which could mean, errored information. =/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация