subtract two tables created by connection.cursor and display output on webpage

2015-11-24 Thread Sid
I have displayed two tables on web(i.e table1 and table2) using *connection.cursor* from *SOURCE* table *ISSUE:* Now I have to subtract table1(fields)-table2(fields) and display the output as table3. so *final web page* will have table1,table2,table3 *PROGRAM:* IN

Re: connection.cursor()

2012-02-16 Thread MikeKJ
Actually Bruno thats great, it put me on the right track and I have now solved the error, my bad really I forgot how to properly construct a join sql statment... Cheers -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: connection.cursor()

2012-02-16 Thread bruno desthuilliers
f dictfetchall(cursor): # avoid reexecuting constant code in a loop desc = col[0] for col in cursor.description for row in cursor: yield dict(zip(desc, row)) > def secondhand(request): >     from django.db import connection, transaction Please avoid imports in funct

connection.cursor()

2012-02-16 Thread MikeKJ
ywn.field = 0 def dictfetchall(cursor): desc = cursor.description return [ dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall() ] def secondhand(request): from django.db import connection, transaction cursor = connection.cursor() cursor.execute

Re: question about connection.cursor() and transactions

2009-01-26 Thread Karen Tracey
On Thu, Jan 15, 2009 at 9:57 PM, bob84123 wrote: > > I have an app that uses a few custom SQL calls through > connection.cursor() > as described in > http://docs.djangoproject.com/en/dev/topics/db/sql/#topics-db-sql. > However they don't display the same transaction semant

Re: question about connection.cursor() and transactions

2009-01-26 Thread bob84123
Just thought I'd re-ask this question as it seems to have slipped through the cracks and I'm still very interested in the answer. Thanks. On Jan 16, 1:57 pm, bob84123 wrote: > I have an app that uses a few custom SQL calls through > connection.cursor() > as

question about connection.cursor() and transactions

2009-01-15 Thread bob84123
I have an app that uses a few custom SQL calls through connection.cursor() as described in http://docs.djangoproject.com/en/dev/topics/db/sql/#topics-db-sql. However they don't display the same transaction semantics as specified in http://docs.djangoproject.com/en/dev/topics/db/transac