Enter a topic name to show or a new topic name to create; then press Enter

Using Python and Sqlite3

A script to create a database for a sqlite3 based survey system in the wiki

conn = sqlite3.connect(r'c:\VirtualDir\LynxWiki\App_Data\survey.db')
c = conn.cursor()
sel = conn.cursor()
sel.execute("""select countemoticons/star.gif from sqlite_master where type = 'table' and name = 'surveys'""")
if sel.fetchone()[0] == 0 :
    c.execute('create table surveys (id integer primary key autoincrement, title text, date text, numberofitems real)')
    c.execute('create table survey_questions(id integer primary key autoincrement, seq_no integer, question text, surveyid integer)')
    c.execute('create table survey_responses(id integer primary key autoincrement, ip text, user text null, questionid integer, surveyid integer)')

near "/": syntax error

Edit the content of this message to create your new page. Add tags as required and then save the page.

Version: 4   Revised: 2013-04-13 19:35:30 Last Updated by: Rename Show Links to Topic