php db2 返回当前insert记录的自增id

SELECT ID from FINAL TABLE (
    INSERT INTO xxx
       (aaa, bbb, ccc, ddd, fff, ggg) 
           VALUES ('%s', '%s', '%s', '%s', '%s', '%s')
)

php 连接 db2,可能是我本地的php版本问题,db2_last_insert_id  这个方法不好用无法返回id,所以用了上面的SQL

posted @ 2019-10-17 14:41  刘宇石  阅读(398)  评论(1编辑  收藏  举报