import cgi, os, sys import sqlite3 as db conn = db.connect('test.db') cursor = conn.cursor() conn.row_factory = db.Row cursor.execute("select * from person") rows = cursor.fetchall() sys.stdout.write("Content-type: text.html\r\n\r\n") sys.stdout.write("") sys.stdout.write("<html><body><p>") for row in rows: sys.stdout.write("%s %s %s" % (row[0],row[1],row[2])) sys.stdout.write("<br />") sys.stdout.write("</p></body></html>")
收藏
0人收藏
- 2014-10-17 11:43:19python从sqlite读取数据并显示 by 羊半仙
- 2014-01-08 20:04:59python操作sqlite by 自由魂
- 2013-06-05 13:21:25python 使用MySQLdb连接mysql by 玉开Sir
- 2013-07-27 19:28:15python sqlite3的常规使用 by 风云轩
- 2014-02-02 13:45:04python查询sqlite数据表代码 by 逆风扬
- 2014-10-03 19:51:10django 简单显示数据库的内容 by Solon.Ring
- 2012-11-18 14:33:54C#调用SQLite演示代码 by starstroll
- 2014-07-27 14:27:36python mysql insert delete query by 风云轩
- 2012-11-08 17:42:49ruby连接sqlite by 金背二郎
- 2014-07-20 15:59:03# MYSQL 添加 删除 修改 查询 自己写的一个函数 by 蟋蟀MM
- 2019-02-14 11:33:05收到控股和授课风格吧 by nfzy8yhh
相关聚客文章