[Zope] FW: Filling lists from SQL methods

Norman Khine khine@bmpublications.co.uk
Wed, 28 Mar 2001 12:27:51 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C0B782.81AE5010
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


> Hello,
> 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_0006_01C0B782.81AE5010
Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="winmail.dat"

eJ8+IjMLAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEIAAUABAAAAAAAAAAAAAEJAAQAAgAAAAAA
AAABBoADAA4AAADRBwMAHAAMABsAAAADACEBAQOQBgDQBwAAKAAAAAsAAgABAAAACwAjAAAAAAAD
ACYAAAAAAAsAKQAAAAAAAwAuAAAAAAADADYAAAAAAB4ATQABAAAAAQAAAAAAAAAeAHAAAQAAAB8A
AABGaWxsaW5nIGxpc3RzIGZyb20gU1FMIG1ldGhvZHMAAAIBcQABAAAAGwAAAAHAtf211Qsp3fIh
zBHVmhIAYJcWaGAAXxK4IAALABcMAAAAAAIBHQwBAAAAIAAAAFNNVFA6S0hJTkVAQ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