Python MySQL LIKE Operator -


how check data in mysql longer variable? i've tried operators , can't seem work variable longer data in database.

sn = +123456789 number database 456789 

this code python script.

sn= [ '%' + str(+123456789) + '%'] query = "select * table number %s" cur=con.cursor() cur.execute(query, sn) if cur.fetchone():        print "there number" else:         print "there isnt number" 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -