本文整理匯總了Python中MySQL.MySQL.close方法的典型用法代碼示例。如果您正苦於以下問題:Python MySQL.close方法的具體用法?Python MySQL.close怎麽用?Python MySQL.close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MySQL.MySQL
的用法示例。
在下文中一共展示了MySQL.close方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: MySQL
# 需要導入模塊: from MySQL import MySQL [as 別名]
# 或者: from MySQL.MySQL import close [as 別名]
# Author : Tushar Niras, Amol Morbale
# Email : [email protected]
# Information : this class is defined to make CRUD operations easy.
#===================================================================================
#import yahoo_finance
#from yahoo_finance import Share
from MySQL import MySQL
import re
sql = MySQL()
# sql.order_by function should be called before the sql.select() function.
# this will select all the feilds from `users` table.
# you can specify whichever feilds you want to return. like : sql.select("users")
sql.where("email", "[email protected]")
sql.order_by("email", "asc")
result = sql.select("users", "id, email")
for email in result:
print "%s : %s" % (email["id"], email["email"])
#sql.delete("users")
sql.close()