Changeset 3494

Show
Ignore:
Timestamp:
04/09/08 09:34:07 (9 months ago)
Author:
bselby
Message:

Updated the SQL so it will now work in SQLite, MySQL and Postgres

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • peerreviewplugin/branches/2.1-toddler/codereview/CodeReviewStruct.py

    r2577 r3494  
    4747        #Add information to a new database entry 
    4848        if self.IDReview == "": 
    49             query = "INSERT INTO CodeReviews VALUES(NULL,'" + dbEscape(self.Author) + "','" + dbEscape(self.Status) + "','" + `self.DateCreate` + "','" + dbEscape(self.Name) + "','" + dbEscape(self.Notes) + "')" 
     49            query = "INSERT INTO CodeReviews (Author, Status, DateCreate, Name, Notes) VALUES('" + dbEscape(self.Author) + "', '" + dbEscape(self.Status) + "', '" + dbEscape(self.DateCreate) + "', '" + dbEscape(self.Name) + "', '" + dbEscape(self.Notes) + "')" 
    5050            cursor.execute(query) 
    5151            db.commit()