1、表中提取数据
sql = "SELECT * FROM table WHERE name='%s'AND time='%s'" % (name,time)
多个选择条件用AND连接,提取多个数据用','间隔。
2、表中插入数据
sql = "INSERT INTO table (name, time) VALUES ('%s','%s')" % (name,time)
3、表中删除数据
sql = "DELETE FROM table WHERE name='%s'AND time='%s'" % (name,time)
4、表中更新数据
sql = "UPDATE table set name='%s',time='%s' WHERE id='%s'" % (name,time,id)
---------------------