Skip to main content
Inspiring
March 2, 2009
Answered

dynamic image woes

  • March 2, 2009
  • 5 replies
  • 971 views
hi again, I made your suggested corrections to my code and there are no error messages, however, no images display on the details page.
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Newsgroup_User
1) add <cfdump var="#cool#"> right after the query on page 3
2) check the query dump - did it return any data (images)?
if it did - the problem is with your code that displays the images, not
the query.
if it did not - check the value of projectID in the url - is it what you
expect it to be? (i have just guessed/assumed that #cool.projectID# on
your page 2 would be the correct projectID - maybe i was wrong?)
i have also assumed your projectID column is of type imteger/numeric -
if it is not, then change the cfsqltype to cerrect one in the
<cfqueryparam> tag...

if all else fails - post all relevant code from your page 3.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

5 replies

Newsgroup_UserCorrect answer
Inspiring
March 2, 2009
1) add <cfdump var="#cool#"> right after the query on page 3
2) check the query dump - did it return any data (images)?
if it did - the problem is with your code that displays the images, not
the query.
if it did not - check the value of projectID in the url - is it what you
expect it to be? (i have just guessed/assumed that #cool.projectID# on
your page 2 would be the correct projectID - maybe i was wrong?)
i have also assumed your projectID column is of type imteger/numeric -
if it is not, then change the cfsqltype to cerrect one in the
<cfqueryparam> tag...

if all else fails - post all relevant code from your page 3.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
rockhikerAuthor
Inspiring
March 2, 2009
It works !!! I changed the query to

SELECT thumb
FROM completeImages
WHERE projectID = <cfqueryparam cfsqltype="cf_sql_integer"
value="#url.projectID#">

and I changed the link to: &projectID=#cool.projectID#"


I am trying to dispaly an images unavailabe message if there are no images in the database. pls see code.

<cfoutput query="coolpicx">
<cfif #thumb# EQ " ">

<img src="/crabweb1a/Images/CompleteProjectImages/completeThmbs/#thumb#"/>
<cfelse>
Images unavailable
</cfif>
</cfoutput>