Home » Unlabelled » Python read all rows of MySQL table Hasan Basri 3:48 PM 0 comments Python read all rows of MySQL table Below python code print all first column values of table in MySQLquery="SELECT * from table_name"cursor.execute(query)row = cursor.fetchone() while row is not None: print(row[1]) row = cursor.fetchone() Share: Facebook Twitter Google+ StumbleUpon Digg Delicious LinkedIn Reddit Technorati
0 comments:
Post a Comment