title: python return function(sql statement error)
body: <p>I can return commands in my return function but something need to improve:
  1. I am trying to get "enable" and "conf t"command in "function" field everytime.</p>
  
  <p>B4(select function and type)(I can return my commands):</p>
  
  <pre><code>def readrouter(x, y):
          conn = sqlite3.connect('server.db')
          cur = conn.cursor()
          cur.execute("SELECT DISTINCT command FROM router WHERE   function =? or type = ?  ORDER BY key ASC",(x, y))
          read = cur.fetchall()
          return read;
  
  a = raw_input("x:")
  b = raw_input("y:")
  for result in readrouter(a,b):
      print (result[0])
  </code></pre>
  
  <p>After:(select enable, conf t, and "commands")</p>
  
  <pre><code>def readrouter(x):
          conn = sqlite3.connect('server.db')
          cur = conn.cursor()
          cur.execute("SELECT DISTINCT command FROM router WHERE   function =? or function='configure terminal' or function='enable'  ORDER BY key ASC",(x))
          read = cur.fetchall()
          return read;
  
  a = raw_input("x:")
  for result in readrouter(a):
      print (result[0])
  </code></pre>
  
  <p>Hope you know what I mean but now I cant do what I want.
  It presents:</p>
  
  <pre><code>x:create vlan
  Traceback (most recent call last):
    File "C:/Users/f0449492/Desktop/2015225/database.py", line 323, in &lt;module&gt;
      for result in readrouter(a):
    File "C:/Users/f0449492/Desktop/2015225/database.py", line 318, in readrouter
      cur.execute("SELECT  command FROM router WHERE   function =? or function='configure terminal' or function='enable'  ORDER BY key ASC",(x))
  sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 7 supplied.
  
  Process finished with exit code 1
  </code></pre>