Re: modifications on a query

"Charlie Clark" <[email protected]>
Newsgroups gmane.comp.web.zope.database
Organization eGenix.com
Message-ID <[email protected]>
Am 26.01.2007, 08:37 Uhr, schrieb Graziella Toutoungis  
<[email protected]>:

>
> Hello,
> I use zope2.9.4 with postgresql8.1, in my database i have some tables  
> are the result  of a query on other tables.
> exe: table1 is the result of table2 with table3
> My
> user can connect to the database and he can modify the  table1, this
> modification should done on the orginals tables table2 and table3
>  my
> problem is how  i can  specify the origin of the column in table for
> verifing that table2 and table3 may this modifications?

I am not exactly sure what you wish to do: is table1 simply a view based  
on a query of table2 and table3? It certainly sounds like it should be.  
But I am not sure if you update views in PostgreSQL that the original  
tables get updated.

You might wish to ask your question again in French as some of us will at  
least understand it like that.

Anway if you wish to update tables based on the results of queries in Zope  
you are probably best using a PythonScript to link the appropriate queries  
if this is not directly possible in SQL.

ie.

results = context.SQL.someQuery()
for result in results:
     context.SQL.anotherQuery(result) # you probably wish to pass a  
dictionary based on the first query in

Charlie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.