本文包含一些可以下载的示例代码和一个示例数据库。
This article includes snippets of code examples and provides an example database that you can download.
问题在于访问数据库以找到一个给定作者的所有书籍的代码中,如下所示。
The problem is in the code that accesses the database to find all the books for a given author, as shown below.
把所有数据库代码放在一个名为 dbroutines.py 的文件中,这样就更容易管理和查找它们。
Placing all the database code in a file named dbroutines.py makes it easier to manage and to find things later.
应用推荐