[Zope] SQL methods

Norman Khine khine@bmpublications.co.uk
Tue, 27 Mar 2001 17:03:48 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C0B6DF.E3E60A00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


Can any one help me understand the concept behind this example:

In the How-To from http://www.zope.org/Members/AlexR/SelectionLists sub
section Filling lists from SQL methods, we have a method

<SELECT name="myList">
 <dtml-in mySQLQuery>
  <OPTION VALUE='<dtml-var Field1 null="">'>
  <dtml-var Field2 null="">
 </dtml-in>
</SELECT>

How can I create a second list so that when I select Field1, the list is
updated from another SQL query using the value of Field1 as the variable.

So for example, I have two tables: ProductGroups and Products
ProductGroups has ProductGrpID, Description
Product has ProductID, Description and FK_ProductGrpID

Therefore if the user select ProductGrp =1 then the second drop-down menu
will only select Products where FK_ProductGrp = 1.

Thanks

Norman


------=_NextPart_000_0012_01C0B6DF.E3E60A00
Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="winmail.dat"

eJ8+IjAQAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAANEHAwAbABEAAwAAAAIADAEB
A5AGAEQHAAAlAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADADYAAAAAAB4AcAAB
AAAADAAAAFNRTCBtZXRob2RzAAIBcQABAAAAFgAAAAHAttd5BYqgB3IikRHVmhMAYJcWaGAAAAIB
HQwBAAAAIAAAAFNNVFA6S0hJTkVAQk1QVUJMSUNBVElPTlMuQ08uVUsACwABDgAAAABAAAYOANJK
Zde2wAECAQoOAQAAABgAAAAAAAAANIcE9Sk91BGZDAAAHNYEI8KAAAALAB8OAQAAAAIBCRABAAAA
+wIAAPcCAAB5BAAATFpGdWm9UUADAAoAcmNwZzEyNRYyAPg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