EasyCFM.COM ColdFusion Forums / Coding Help! / Multiple Queries Problem with ListQualify

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Multiple Queries Problem with ListQualify

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

12-11-2005 @ 5:25 PM
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Dec 2005

Here's where I'm at.

So, I persist model_ID values from a form. They are values a1,b1,c1

I want to output values from two tables, "model" and "stdfeatures" in rows, using cfloop.

<cfparam name="FORM.Model_ID" default="1">
<cfparam name="PageNum_Model" default="1">
<cfquery name="stdfeatures" datasource="ppg">
FROM stdfeatures, model
WHERE stdfeatures.Model_ID=model.Model_ID
AND stdfeatures.Model_ID
IN (#ListQualify(FORM.Model_ID,"'")#)</cfquery>

. . .and the output:

<cfloop query="stdfeatures">

<cfoutput>#model.x x x #</cfoutput> <cfoutput>#stdfeatures.xxx#</cfoutput>


When i run this in CF i get an error, " Element xxx is not defined in Model"

Have I gone on a rabit trail here? Can I do this with two queries and nest the output?

Again. Thanks for all your help.


12-12-2005 @ 10:38 AM
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1033
Joined: Mar 2004

what do you want to output from model table? when you use #model.x x x #, it will throw that error since model is not defined. since your query name is stdfeatures, you should use something like

hope it helps...

Website Designed and Developed by Pablo Varando.