添加 '排行榜2'
This commit is contained in:
parent
4ebe761dfd
commit
4b19f82f90
|
@ -0,0 +1,25 @@
|
|||
class Query_Db(object):
|
||||
def _init_(self, dbname=DB_NAME):
|
||||
self.conn-None
|
||||
self.db_table='books'
|
||||
self.db_name-dbname
|
||||
self.get_conn ()
|
||||
|
||||
def get_conn (self):
|
||||
try:
|
||||
self.conn = sqlite3.connect (self.db_name)
|
||||
except Exception as e:
|
||||
print 'Error:' ,e
|
||||
def get_total_ num(self);
|
||||
|
||||
def query_pub_company(self)
|
||||
nums=list(range(1,10))
|
||||
for num in nums:
|
||||
if num == 1:
|
||||
print("1st")
|
||||
elif num == 2:
|
||||
print("2nd")
|
||||
elif num == 3:
|
||||
print("3rd")
|
||||
else:
|
||||
print(str(num)+"th")
|
Loading…
Reference in New Issue