Forum OpenACS Development: Re: SQL queries 'n TCL

Collapse
2: Re: SQL queries 'n TCL (response to 1)
Posted by Patrick Giagnocavo on
Iuri, what you need is to do a subselect. This is where you take the 2 queries and combine them, returning only the results you want. The method you mention will be extremely slow.

If on the other hand, you need to have the user select from a list (from the first query) and then return information based on what the user chooses, it is better to have them first choose the organization_ids , then go ahead and do the query with the organization_ids as a list.

Does that answer your question?

Collapse
3: Re: SQL queries 'n TCL (response to 2)
Posted by Iuri Sampaio on
I beileve the first method you mentioned is the one i need.

The subselect is the best way, Since the users dont need to choose anything, I meant, the first query is just to match the users(oganizations owners) with the organizations, in order to get the orgs info.

By the way, I have no clue how to use subselect! :(