Thank you to all who responded. I figured it out finally! I used the
following cfquery and cfoutput.

<cfquery datasource="recipes" name="rec">
SELECT RecipeIngredients.RecipeID, Ingredients.IngredientID,
Ingredients.Ingredient
FROM RecipeIngredients, Ingredients
WHERE #form.Recipe_ID# = RecipeID AND RecipeIngredients.IngredientID =
Ingredients.IngredientID

</cfquery>

<cfdump var="#rec#">

Ingreidents:
<ul>
<cfoutput query="rec">
<li>#Ingredient#</li>
</cfoutput>
</ul>

That CFDUMP tag really helped out. Thanks to Matthew Walker for that one!
Now I can finally get my 3 hours of beauty sleep!

Phil
-----Original Message-----
From: Ben Koshy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 24, 2002 8:09 PM
To: CF-Talk
Subject: RE: Running out of time.


You do notice the ---> you have behind the field: "Comments" ... Not
sure if that was mistake when posting here or in your actual code.

I thought your issue was that it was displaying IngredientIDs instead of
the Ingredient Names?

Ben Koshy
Technical Manager
W3 International Media Ltd.
T.604.871.9899 ext.388
1.866.4.WEB.NOW

'Celebrating 5 years of Internet Service Excellence!'
www.w3media.com 'Effective Web Now!'
www.w3media.net 'Fast Reliable Hosting!'
www.w3registry.com 'Simply Web Domains!'



-----Original Message-----
From: Phillip Perry [mailto:[EMAIL PROTECTED]]
Sent: August 24, 2002 5:02 PM
To: CF-Talk
Subject: RE: Running out of time.


My Insert Statement

<cfquery datasource="recipes" name="new_recipes">

INSERT INTO RecipeIngredients
(
RecipeID,
IngredientID
Quantity,
Comments --->
)
values
(
'#form.Recipe_ID#',
'#form.Ingredient_#'
'#form.QTY#',
'#form.Comm#'
)
</cfquery>

-----Original Message-----
From: Brook Davies [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 24, 2002 8:06 PM
To: CF-Talk
Subject: RE: Running out of time.


Ahh, then when you do the INSERT, you may be inserting
"form.Ingredient_" as a literal string instead of as #form.Ingredient_#
the actual value. Have you looked in your DB to ensure the data is in
there? Can I see your insert statement?


At 07:40 PM 24/08/02 -0400, you wrote:
>Brook, it looks like it displays the same thing even when I reverse the

>order.
>
>Thanks anyway
>
>-----Original Message-----
>From: Brook Davies [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, August 24, 2002 7:39 PM
>To: CF-Talk
>Subject: RE: Running out of time.
>
>
>This line looks like you are trying to select #form.Ingredient_# =
>Ingredients.IngredientID. Is that backwards?
>
>
>
>WHERE RecipeIngredients.RecipeID = #form.Recipe_ID# AND
>#form.Ingredient_#
=
>Ingredients.IngredientID
>
>
>
>At 07:15 PM 24/08/02 -0400, you wrote:
> >It's kind of a long explaination which is why I wanted it offline but
here
> >it is,
> >
> >I built a form for inserting ingredients into a database. After each
> >ingredient is inserted in the database, the form is reset and the
>ingredient
> >just inserted is displayed as regular text above the newly blank
> >form.
This
> >goes on until all ingredients have been input. The only problem I'm
having
> >is that the ingredient ID number is getting displayed rather than the

> >Ingredient name. It works as expected in all other areas. This is my
>cfquery
> >and cfoutput code...
> >
> ><cfquery datasource="recipes" name="ingred">
> >SELECT *
> >FROM RecipeIngredients, Ingredients
> >
> >WHERE RecipeIngredients.RecipeID = #form.Recipe_ID# AND
#form.Ingredient_#
>=
> >Ingredients.IngredientID
> >
> ></cfquery>
> >
> >Ingreidents:
> ><ol>
> ><cfoutput query="ingred">
> ><li>#Ingredient#</li>
> ></cfoutput>
> ></ol>
> >
> >I can't seem to get the name itself to show, just the id number. Do
> >you
>have
> >any suggestions. If you need to see the tables I can provide them.
there's
>2
> >relatively short ones that relate to this query (as you can see in
> >the cfquery).
> >
> >Thanks for the help.
> >
> >Phil
> >
> >-----Original Message-----
> >From: Mike Townend [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, August 24, 2002 7:07 PM
> >To: CF-Talk
> >Subject: RE: Running out of time.
> >
> >
> >What sort of problem are you having?
> >
> >
> >
> >-----Original Message-----
> >From: Phillip Perry [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, August 24, 2002 23:54
> >To: CF-Talk
> >Subject: Running out of time.
> >
> >
> >Hi
> >
> >If possible could someone help me off list with an issue regarding
> >ColdFusion/access please. My time is getting limited and I can't seem

> >to get things right.
> >
> >Thanks,
> >
> >Phil
> >[EMAIL PROTECTED]
> >
> >
> >
>
>



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to