MySQL - Select the last inserted row easiest way

后端 未结 9 1896
误落风尘
误落风尘 2020-11-30 09:56

I simply need to select the last entered row specified by condition, e.g:

SELECT ID from bugs WHERE user=Me

I need to return only the very

9条回答
  •  我在风中等你
    2020-11-30 10:29

    Just after running mysql query from php

    get it by

    $lastid=mysql_insert_id();
    

    this give you the alst auto increment id value

提交回复
热议问题