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

Joining 2 cfqueries

New Here ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

I'm trying to join 2 separate queries. One query is coming from a table that contains the property number and address. The other query is created by using QueryNew which contains property number and datelastmodified (cfdirectory). My goal is to run a query that displays all the property from the table with the last modified date of the jpg. The filename of the jpg is the same as the property number.

Example:

Property Number: Address: Photo Name: Date Photo Uploaded:
12345 (from table) 123 Main St (from table) 12345.jpg 02/09/2009 01:00PM (cfdirectory)
TOPICS
Advanced techniques

Views

404

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 ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

> My
> goal is to run a query that displays all the property from the table with the
> last modified date of the jpg. The filename of the jpg is the same as the
> property number.

And an admirable goal it is.

How did it go?

I word it this way because you didn't actually ask a question in your post,
nor did you you indicate you had problems achieving your end, nor did you
show us any code which might have been giving you problems in arriving at
said goal.

So other than saying "yep, good idea", I don't actually know what you
expect anyone to say.

Can I buy a vowel?

--
Adam

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 ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

In addition to Adam's comments, if you are using cfdirectory, you probably don't need QueryNew.

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
New Here ,
Feb 11, 2009 Feb 11, 2009

Copy link to clipboard

Copied

If the filename of a jpg is the same as the primary key in a table, how do I join those 2 together?

For example:

Query:
SELECT PROPID,ADDRESS FROM PROPERTY
Results:
10000 123 South Wacker St
10001 321 Halsted St

\Photos\
10000.jpg
10001.jpg

Sorry my last post wasn't clear...

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 ,
Feb 11, 2009 Feb 11, 2009

Copy link to clipboard

Copied

LATEST
quote:

Originally posted by: hanslim504
If the filename of a jpg is the same as the primary key in a table, how do I join those 2 together?

For example:

Query:
SELECT PROPID,ADDRESS FROM PROPERTY
Results:
10000 123 South Wacker St
10001 321 Halsted St

\Photos\
10000.jpg
10001.jpg

Sorry my last post wasn't clear...


When you select your photos, select the constant 1000000 as a joining field. Then loop through the results and change it to something that coincides with the photo. ListFirst looks promising. Then you can use the new value to join to your other query.

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
Engaged ,
Feb 11, 2009 Feb 11, 2009

Copy link to clipboard

Copied

So you want to join a field value in one table of "10000" with a field value of "10000.jpg"?

You might want to rethink your database design.

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