import mysql.connector print ("wants to connect") cnx= mysql.connector.connect(user='newuser',password='user_password', host='127.0.0.1', database='shotor') print('connected successfully') cursor=cnx.cursor() query= 'SELECT * from friends' cursor.execute(query) for (name,phone,stat) in cursor: print ('My friend %s number: %s and they are %savailable now%s'%( "{0:>8}".format(name),"{0:>9}".format(phone),''if stat=='y' else 'not ','!'if stat=='y' else ' :(')) cnx.close()
bash برای rename کردن زیرنویس ها
cursor ,if ,cnx ,stat ,print ,%s ,y else ,stat y ,if stat ,mysql connector ,{0 8}
درباره این سایت