diff options
| author | pinky <> | 2007-02-06 14:53:39 +0000 |
|---|---|---|
| committer | pinky <> | 2007-02-06 14:53:39 +0000 |
| commit | 63f1614bfec3a551d73de9a484e2d7c606828f08 (patch) | |
| tree | c072edd0cd52b46859a1b5d0003c59a98ab7dd2d /bin/sql_db.py | |
| parent | efbdb2e75fb3f4c54cf6e7007263854166f1a270 (diff) | |
Purchase:
bugfix creating invoices: the journal of the invoice was not good
bzr revid: pinky-f3c27489ecabe5985ef3610c2ab7016bef801291
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index 005d66fec53..af57255fb56 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -48,9 +48,9 @@ class fake_cursor: self.con = con self.dbname = dbname - def execute_dont_run(self,*args): - if not fake_cursor.nbr % 100: - print 'sql: ',fake_cursor.nbr + def execute(self,*args): + if not fake_cursor.nbr % 1: + print 'sql: ',fake_cursor.nbr, args res = re.match('^select.* from ([a-zA-Z_]+) .*$', args[0], re.I) if res: fake_cursor._tables.setdefault(res.group(1), 0) @@ -62,15 +62,15 @@ class fake_cursor: # else: # print 'sql: ',fake_cursor.nbr, args[0] - if not fake_cursor.nbr % 5000: - ct = [] - for t,c in fake_cursor._tables.items(): - ct.append([c,t]) - ct.sort() - ct.reverse() - print 'After %d queries' % (fake_cursor.nbr,) - for line in ct[:50]: - print ' %s: %d' % (line[1], line[0]) + #if not fake_cursor.nbr % 5000: + # ct = [] + # for t,c in fake_cursor._tables.items(): + # ct.append([c,t]) + # ct.sort() + # ct.reverse() + # print 'After %d queries' % (fake_cursor.nbr,) + # for line in ct[:50]: + # print ' %s: %d' % (line[1], line[0]) #if len(args)>1: # print 'sql: ',fake_cursor.nbr, args[0], args[1] |
