mysql python: check whether an input exists in database
<p>Can anyone help? 
   I have created a mysql database called 'ice cream' and connected it to python 3.3.5. I have a table with 2 columns : "MemberID" and "Username". Now i want to ask whether the user is a member or not, if he replies yes, my next question is ask him to key in his memberID, how do i check whether his input exists in the "MemberID" column my database, and if it exists, how can i print his "Username"?</p>

<pre><code>conn = mysql.connector.connect(user='root', password='1234',
                              host='127.0.0.1',
                              database='icecream')

cursor = conn.cursor

Member_Ans=input("Are you a member? ")
if Member_Ans=="yes":
while True:     
    loginID=input("Please enter your member ID: ")
    # I don't know what code to type in this part...
conn.close() 
</code></pre>