PHP TP5 鏈接postgres數據庫,獲取新增數據主鍵值

TP5 文檔中::說明:新增數據,若是要獲取新增數據的自增ID  php 1.     使用Model,能夠使用下面的方式:sql $user = new User; $user->name = 'thinkphp'; $user->email = 'thinkphp@qq.com'; $user->save(); // 獲取自增ID echo $user->id
相關文章
相關標籤/搜索