• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Passing an argument from a db result

LEGEND ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

What is wrong with this and why is it not passing the variable show_id? I
outputs the correct show_id number in text
(<cfoutput>#getlastentry.show_id#</cfoutput>). I keep getting that show is
required but not passed. Please help.

<cfquery name="getlastentry" datasource="sql_portal">
Select show_id FROM RadioShowInfo
Where creator = '#getAuthUser()#'
Order by show_id DESC
</cfquery>
<!---Create Object For Shows Component--->
<cfobject name="Shows" component="cfcs.radioshow.show">
<!---Step 2: Add photos and captions--->
<cfif IsDefined ('Submit_Add')>
<cfinvoke component="#Shows#" method="UpdateGuestPhotos">
<cfinvokeargument name="show" value="#getlastentry.show_id#">


TOPICS
Advanced techniques

Views

171

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

<cfinvoke component="#Shows#" method="UpdateGuestPhotos">
<cfinvokeargument name="show" value="#getlastentry.show_id#">


Just to make sure, you have a closing </cfinvoke> tag in you code right?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

Nevermind. I forgot to use the </cfinvoke> after the invoked argument.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

LATEST
Thanks Ian. I noticed that before I could get back to the forum.

Can you help me on my other post regarding the 'result' attribute of cffile.
I am get a duplicate error...


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation