I am using the go-mysql-driver https://github.com/go-sql-driver/mysql
I am looking for something like the following in Python:
c = conn.cursor()
c.execute(sql)
result = c.fetchall()
for elem in result:
list.append(elem[i])
return list
And the only thing that comes to my mind is:
result, err := conn.Exec(query)
// func (db *DB) Exec(query string, args ...interface{}) (Result, error)
I want to traverse through the results from the Exec method and then fetch the data.