web.py - 获取刚刚插入到 web.py 中的记录

标签 web.py

当我在 web.py 中将记录插入数据库时​​,我注意到插入不会返回我刚刚插入的记录。我如何获取该记录,或者至少该记录中的特定列?

最佳答案

db.insert 返回最后一个插入 ID,要获取记录,您应该使用 db.select 选择它。

关于web.py - 获取刚刚插入到 web.py 中的记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7375017/

相关文章:

python - 使用 webpy 和 urllib2 发送文件

python - Web.py 守护进程通信

python - 如何停止作为 Windows 服务运行的 web.py 服务器

python - 使用 web.py 的 web.database 时应该如何防止滥用?

python - web.py - WalkerError : ('unexpected node type' , 339)

python - web.py sql查询,为什么只能遍历第一遍的结果?

python - 如何从 POST 方法重定向到 web.py 中的另一个处理程序

python - 如何在Python中导入/添加名为web的模块

python - Web.py - 属性错误 : 'module' object has no attribute 'application'

python - 误解 web.py 应用程序