From: <Z3...@us...> - 2009-10-04 07:24:10
|
Revision: 285 http://spd.svn.sourceforge.net/spd/?rev=285&view=rev Author: Z3po Date: 2009-10-04 07:23:59 +0000 (Sun, 04 Oct 2009) Log Message: ----------- fixed Mixed Collumns bug. there have been nearly everytime a "for collumns in self.__table" but one time a "for collumns in entry" which can be sorted in another way and that broke everythinga. Do we even need the entry object when having the table object all times available? Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-10-03 14:16:10 UTC (rev 284) +++ trunk/src/spdCore.py 2009-10-04 07:23:59 UTC (rev 285) @@ -164,7 +164,7 @@ del fobj else: fobj.close() - + return True #}}} @@ -235,7 +235,7 @@ else: # otherwise write a , query += ", " self.__insertStatement += ", " - + cursor.execute(query) self.__insertStatement += ' VALUES (' @@ -245,7 +245,7 @@ for j in self.__table: entry.update( { j : self.__table[j][i] } ) self.addEntry(entry,commit=False) - + self.__sql.commit() # }}} @@ -309,7 +309,7 @@ def addEntry(self, entry, commit=True): # {{{ cursor = self.__sql.cursor() insertValues = '' - for collumns in entry: + for collumns in self.__table: entry[collumns] = re.sub(r'\'','\'\'', entry[collumns]) insertValues += "'" + entry[collumns] + "'," This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |