#mysql 的语句笔记
----
#查询当前时间
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2017-02-14 19:28:01 |
+---------------------+
1 row in set (0.02 sec)
select * from hs_esl order by \c
ctrl + u
#sql语句中使用变量 “@” 设置变量
mysql> select @nam...
#coding = utf-8
import sqlite3
#1、建立與數據庫的連接
db = '/usr/local/navicat/db.sqlite'
connection=sqlite3.connect(db);
#2、創建數據遊標
cursor=connection.cursor()
#3、執行查詢語句
#cursor.execute("""select date('NOW')""")
cursor.execute("select * from bind_li...
#coding = utf-8
import MySQLdb,sqlite3
def conmysql(sqlname,selectcmd):
conn=MySQLdb.connect(host='localhost',user='root',passwd
='123456',port=3306,charset='utf8')
conn.select_db(sqlname) #選擇數據庫
cur=conn.cursor()
#cur.execute(...