Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def doQuery (Conn):
- cur = Conn.cursor()
- cur.execute ("select a, b, c, d, e, f, g from table1 group by 1,2,3,4,5,6,7 into outfile NPH_01.csv")
- import MySQLdb
- myconnection= MySQLdb.connect(host = '****', user = '****', passwd = '****', db = '****')
- doQuery (myconnection)
- myconnection.close()
Add Comment
Please, Sign In to add comment