title: How to check if record exists with Python MySQdb
body: <p>Im creating a python program that connects to mysql.</p>
  
  <p>i need to check if a table contains the number 1 to show that it has connected successfully, this is my code thus far:</p>
  
  <pre><code>xcnx.execute('CREATE TABLE settings(status INT(1) NOT NULL)')
    xcnx.execute('INSERT INTO settings(status) VALUES(1)')
    cnx.commit()
    sqlq = "SELECT * FROM settings WHERE status = '1'"
    xcnx.execute(sqlq)
    results = xcnx.fetchall()
    if results =='1':
      print 'yep its connected'
    else:
      print 'nope not connected'
  </code></pre>
  
  <p>what have i missed? i am an sql noob, thanks guys.</p>