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

Images in document

Guest
Sep 25, 2006 Sep 25, 2006

Copy link to clipboard

Copied

I have a query with a list of names in an A to Z selectable list. When you select a name it pulls up all the details of courses individuals have sat. They each have a unique principal _id. I have a list of corresponding images names with unique principal ids to tie in with the users principal ID's so that when a name is selected from the list it loads all their course info and also their picture. I cannot however get it to load the image it just comes up blank. The database itself does not have any images the images are in a seperate folder.

Query I am using is

SELECT DISTINCT dbo.PPS_TRANSCRIPTS.PRINCIPAL_ID
FROM (dbo.PPS_SCOS JOIN dbo.PPS_TRANSCRIPTS ON dbo.PPS_SCOS.SCO_ID = dbo.PPS_TRANSCRIPTS.SCO_ID)
JOIN dbo.PPS_PRINCIPALS ON dbo.PPS_TRANSCRIPTS.PRINCIPAL_ID = dbo.PPS_PRINCIPALS.PRINCIPAL_ID
WHERE dbo.PPS_PRINCIPALS.NAME LIKE '#start#'


The output I am using to try and pickup the image is:

<td width="22%" rowspan="5"><img src="images"<cfoutput>#profileImage.PRINCIPAL_ID#</cfoutput>"></td>
TOPICS
Advanced techniques

Views

306

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
Contributor ,
Sep 25, 2006 Sep 25, 2006

Copy link to clipboard

Copied

If your IMG tag looks like this:

<img src="images"<cfoutput>#profileImage.PRINCIPAL_ID#</cfoutput>">

The problem is the quotation marks after images. Assuming images is your subdirectory, you'd want:

<img src="images/<cfoutput>#profileImage.PRINCIPAL_ID#</cfoutput>">

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
Guest
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

I have left out the quotes but it is still not bringing up any images. The code I listed, the query name is profileimage so it should pick up the images but does not.

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 25, 2006 Sep 25, 2006

Copy link to clipboard

Copied

<img src="images/<cfoutput>#profileImage.PRINCIPAL_ID#</cfoutput>">

Or the cleaner, IMHO

<cfoutput><img src="images/#profileImage.PRINCIPAL_ID#"></cfoutput>

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
Guest
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

Ian,

I have tried the code below but it is still not picking up the images, I get no errrors just no pictures. Any ideas gratefully received.

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 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

LATEST
Standard debugging techniques.

1) View the source of you resulting page to make sure the <img...> tag
is complete and correct.

2) Print out the profileImage.Principal_ID variable to make sure it
contains the correct value.

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