On 16/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> We are trying to use them to generate a report.... where a bunch of
> calculations are being made... via a custom sql query... then hand all
> of the results back to my django view to display.
>
> After they are displayed...they can be nuked...but the guy working on
> this piece told me he couldn't get the temp table to stick around long
> enough with the django connection to be able to get the results back
> because I believe he runs several queries...then compiles them all
> into one be result ( not sure on this, as he is writing it, and I
> haven't reviewed his code as of yet ) ...  so he started hardcoding
> the db un/password in there and creating a mysqldb connection...which
> I didn't agree with...so thought I'd ask about it on here.
>
> I'll have to look deeper into his code to see exactly what he may be
> doing wrong...but I thought I'd ask on here...just to find out if
> there were any special types of things you needed to do with temp
> tables.

If the report can't be created and displayed in a single-step view,
using python/django/sql as needed,  you might also want to create a
special table/model that keeps the results of reports/summaries you're
making, so they persist and can be rendered in a different view. You
can always purge that table afterwards. You can even create it as a
HEAP table, if it won't be growing too big and keep it small and fast
in-memory.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to