convert sqlite code to DAL

22 views
Skip to first unread message

Maurice Waka

unread,
Jun 10, 2015, 9:09:40 AM6/10/15
to web...@googlegroups.com
I have been working with sqlite DB for some time but want to integrate my codes to web2py esp. DAL.
How do I  rewrite such a code to DAL script?


name = input ('Please Type your Question:  ').lower().split()  
      name2 = name[:]
      import sqlite3
      for item in name2:#break                
         conn = sqlite3.connect("foods.db")
         cursor = conn.cursor()           
         cursor.execute("INSERT INTO INPUT33 (NAME) VALUES (?);", (name2,))      
         cursor.execute("select MAX(rowid) from [input33];")
         conn.commit()      
         for rowid in cursor:break         
         for elem in rowid:
            m = elem            
            print(m)
            cursor.execute("DELETE FROM INPUT33 (NAME) WHERE NAME = name")

Reply all
Reply to author
Forward
0 new messages