Advertisement
Guest User

Untitled

a guest
Jun 4th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. def FormatDropDown():
  2.         conn = pgdb.connect(host='localhost', database='mailman_members', user='mailman', password='mailman')
  3.         cursor = conn.cursor()    
  4.         command = cursor.execute("Select listname from mailman_test")
  5.         data = cursor.fetchall()
  6.         items = len(data)
  7. #        while items != 0:
  8. #           a = items -1
  9.         while items != 0:
  10.            for i in range(0, items):
  11.                return '<option>' + data[i][0] + '</option>'      
  12.            items = items - 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement