下面关于显示笔记列表代码正确的是()
A. dashboard()db = MysqlUtil()
B. 实例化数据库操作类sql = "SELECT * FROM articles WHERE author = '%s' ORDER BY create_date DESC" % (session['username'])
C. 根据用户名查找用户笔记信息result = db.fetchall(sql)
D. 查找所有笔记if result:
E. 如果笔记存在,赋值给articles变量return render_template('dashboard.html', articles=result)else:
F. 如果笔记不存在,提示暂无笔记msg = '暂无笔记信息'return render_template('dashboard.html', msg=msg)
G. def dashboard():db = MysqlUtil()
H. 实例化数据库操作类sql = "SELECT * FROM articles WHERE author = '%s' ORDER BY create_date DESC" % (session['username'])
I. 根据用户名查找用户笔记信息result = db.fetchall(sql)
J. 查找所有笔记if result:
K. 如果笔记存在,赋值给articles变量return render_template('dashboard.html', articles=result)else:
L. 如果笔记不存在,提示暂无笔记msg = '暂无笔记信息'return render_template('dashboard.html', msg=msg)
M. def dashboard():db = MysqlUtil()
N. 实例化数据库操作类sql = "SELECT * FROM articles WHERE author = '%s' ORDER BY create_date DESC" % (session['username'])
O. 根据用户名查找用户笔记信息result = db.fetchall(sql)
P. 查找所有笔记if result:
Q. 如果笔记存在,赋值给articles变量return render_template('dashboard.html', articles=result)else:
R. 如果笔记不存在,提示暂无笔记msg = '暂无笔记信息
S. def dashboard():db = MysqlUtil()
T. 实例化数据库操作类sql = "SELECT * FROM articles WHERE author = '%s' ORDER BY create_date DESC" % (session)
U. 根据用户名查找用户笔记信息result = db.fetchall(sql)
V. 查找所有笔记if result:
W. 如果笔记存在,赋值给articles变量return render_template('dashboard.html', articles=result)else:
X. 如果笔记不存在,提示暂无笔记msg = '暂无笔记信息'return render_template('dashboard.html', msg=msg)