Actually, I just need it so that I can have two fields use a query that has two foreign keys referencing a single parent key.  If all I need to do is simply include a standard cfquery at the top, that's great.  For some reason I thought it would be a lot more complicated.
 
Thanks so much,
--Anne

[EMAIL PROTECTED] wrote: -----

To: "'[email protected]'" <[email protected]>
From: John Stanley <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 11/02/2005 07:23AM
Subject: RE: [plum] How to Implement a Custom Query

Anne,
    Are you intending the custom query to replace the normal queryResult query that is automatically generated for populating say, an edit form? If this is the case, the easiest thing I can recommend is just to put a normal query (without all of the plum aliasing) on your page and create your own form which submits to the regular plum action pages. These action pages can be regular plum pages.
    I have done this in a few places and it works well.
Hope this helps,
 John   
-----Original Message-----
From: Anne Girardeau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 01, 2005 4:57 PM
To: [email protected]
Subject: [plum] How to Implement a Custom Query

Can someone send me an example of how to use a custom query?   So far I have a UDF that contains the query (properly aliased to use tablename_column instead of tablename.column) and I've included it in the the ViewForm I want to use it in.  However, I'm not certain this is the proper way to do this.  For example, should I instead place the following code in a CFC?
<cfscript>
selectClause = "Make.make AS Make_make, Model.model AS Model_model, ModelYe.year AS ModelYe_year, Style.style AS Style_style, Doors.doors AS Doors_doors, EngineCylinders.engineCylinders AS EngineCylinders_engineCylinders, DriveTrain.driveTrain AS DriveTrain_driveTrain, SaleType.SaleType AS SaleType_SaleType, Transmission.transmission AS Transmission_transmission, InteriorColor.Color AS InteriorColor_intColor, ExteriorColor.Color AS ExteriorColor_extColor, Condition.condition AS Condition_condition, Body.body AS Body_body, Images.ImageName AS Images_ImageName, Images.FileName AS Images_FileName, Inventory.* AS Inventory_*";
fromClause = "Transmission RIGHT JOIN (Style RIGHT JOIN (SaleType RIGHT JOIN (ModelYe RIGHT JOIN (Model RIGHT JOIN (Make RIGHT JOIN ((EngineCylinders RIGHT JOIN (DriveTrain RIGHT JOIN (Doors RIGHT JOIN (Condition RIGHT JOIN (Body RIGHT JOIN (Colors AS InteriorColor RIGHT JOIN (Colors AS ExteriorColor RIGHT JOIN Inventory ON ExteriorColor.colorID = Inventory.extColorID) ON InteriorColor.colorID = Inventory.intColorID) ON Body.bodyID = Inventory.bodyID) ON Condition.conditionID = Inventory.conditionID) ON Doors.doorID = Inventory.doorsID) ON DriveTrain.DriveID = Inventory.driveID) ON EngineCylinders.engineID = Inventory.engineID) LEFT JOIN Images ON Inventory.inventoryID = Images.InventoryID) ON Make.makeID = Inventory.makeID) ON Model.modelID = Inventory.modelID) ON ModelYe.yearID = Inventory.yearID) ON SaleType.SaleID = Inventory.SaleID) ON Style.styleID = Inventory.styleID) ON Transmission.transmissionID = Inventory.transID";
</cfscript>
If so, where should I save the CFC and how should I reference it in the application?  Any help with this would be greatly appreciated since I can't seem to find anything that documents a specific procedure.
Thanks so much,
--Anne
Anne D. Girardeau
Lead Web Developer
Corporate Information Systems (CIS)
Health and Hospital Corporation
(317) 221-2338
www.hhcorp.org


Confidentiality Notice: This E-Mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the E-Mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this E-Mail is strictly prohibited. If you have received this E-Mail transmission in error, please reply to the sender, so arrangements can be made for proper delivery, and then delete the message from your system. Thank you.


********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm **********************************************************************



Confidentiality Notice: This E-Mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the E-Mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this E-Mail is strictly prohibited. If you have received this E-Mail transmission in error, please reply to the sender, so arrangements can be made for proper delivery, and then delete the message from your system. Thank you.


********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm **********************************************************************

Reply via email to