<Edited: 12-Jun-01 10:05 AM PST>
Thanks for the reply Alex. I'm still confused about the calling convention though. Lets say that I wanted to get a list of Links that are in categories 1, 2, 3, and their corresponding sub-categories. And I wanted to exclude category 4 links, where category 4 is a subcategory of category 1.
How could I do that using your SQL::Sets interface, rather than writing the queries myself, having to take all of the table relationships into consideration?
I could do it like this:
Table->do("DELETE FROM tmp ...");But this would be a kludge compared to the SQL::Sets interface. What if the relationships change one day, then the above code must be hunted down, and revised. Also, the statements that I come up with might not be portable to other SQL servers. Seems like the most readable/portable solution is to use the Sets module, and let the SQL::Driver and friends figure out how to talk to the server for us, depending on the backend.
-Steven
Thanks for the reply Alex. I'm still confused about the calling convention though. Lets say that I wanted to get a list of Links that are in categories 1, 2, 3, and their corresponding sub-categories. And I wanted to exclude category 4 links, where category 4 is a subcategory of category 1.
How could I do that using your SQL::Sets interface, rather than writing the queries myself, having to take all of the table relationships into consideration?
I could do it like this:
Code:
Table->do("CREATE TEMPORARY TABLE tmp SELECT ..."); Table->do("DELETE FROM tmp ...");
-Steven