| 61 | | query = "INSERT INTO ReviewComments VALUES(NULL,'" + dbEscape(self.IDFile) + "', '" + dbEscape(self.IDParent) + "','" + dbEscape(self.LineNum) + "','" + dbEscape(self.Author) + "','" + dbEscape(self.Text) + "','" + dbEscape(self.AttachmentPath) + "','" + `self.DateCreate` + "')" |
|---|
| 62 | | cursor.execute(query) |
|---|
| | 61 | cursor.execute("INSERT INTO ReviewComments " |
|---|
| | 62 | "(IDFile, IDParent, LineNum, Author, Text, AttachmentPath, DateCreate) " |
|---|
| | 63 | "VALUES (%s, %s, %s, %s, %s, %s, %s)", |
|---|
| | 64 | (self.IDFile, self.IDParent, self.LineNum, self.Author, self.Text, self.AttachmentPath, self.DateCreate)) |
|---|
| | 65 | self.IDComment = db.get_last_id(cursor, 'ReviewComments', 'IDComment') |
|---|
| 67 | | query = "UPDATE ReviewComments SET IDFile = '" + dbEscape(self.IDFile) + "', IDParent = '" + dbEscape(self.IDParent) + "', LineNum = '" + dbEscape(self.LineNum) + "', Author = '" + dbEscape(self.Author) + "', Text = '" + dbEscape(self.Text) + "', AttachmentPath = '" + dbEscape(self.AttachmentPath) + "', DateCreate = '" + `self.DateCreate` + "' WHERE IDComment = '" + dbEscape(self.IDComment) + "'" |
|---|
| 68 | | cursor.execute(query) |
|---|
| | 69 | cursor.execute("UPDATE ReviewComments SET " |
|---|
| | 70 | "IDFile=%s, IDParent=%s, LineNum=%s, Author=%s, Text=%s, AttachmentPath=%s, DateCreate=%s WHERE IDComment=%s", |
|---|
| | 71 | (self.IDFile, self.IDParent, self.LineNum, self.Author, self.Text, self.AttachmentPath, self.DateCreate, self.IDComment)) |
|---|