mysql_insert_id() vs. last_insert_id()

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

 



Hi

I've been checking the last_insert_id() function out and I am curious. The
MySQL docs say to use the mysql_insert_id() function after an "insert into"
query to grab the key value. Both seem to work; however, there are some
subtle differences.

Which is the best one to use after a single insert statement, or does it
matter?


----------------------------------------------------------------------
Randy Phillips                                     www.phillips-it.com
phillipsIT, L.L.C.                                 voice: 636.390.9468
Senior Web Developer                                eFax: 501.423.3817
----------------------------------------------------------------------
   Get SideKick -> for MySQL -> http://www.phillips-it.com/sidekick


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux