Home > Backend Development > PHP Tutorial > MYSQL tips -- LAST_INSERT_ID

MYSQL tips -- LAST_INSERT_ID

WBOY
Release: 2016-07-25 09:10:59
Original
964 people have browsed it
MYSQL Tips -- LAST_INSERT_ID                  
                                                                                                                                                                                                                                                                                                       



Use PHP to call mysql. The built-in LAST_INSERT_ID() function may not be used by many people. The most used one is mysql_insert_id();
In fact, there is a difference between the two. LAST_INSERT_ID() can return bigint value id. However, mysql_insert_id returns int. If your id is unsigned int, or bigint. So, maybe what is returned is wrong. Use LAST_INSERT_ID() instead.
  1. Copy code
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template