Your addressing SQL columns in your cf code, which doensn't make sense. See
below....

<cfquery datasource="datasource" dbtype="odbc" name="photo_find">
SELECT p.autoid, e.photo AS photo2,
p.mls_no, e.property_id_no
FROM properties p, property_photos e
WHERE
<cfif (p.autoid EQ e.property_id_no)

The line above is the line that is broken. You are asking CF to look at
p.autoid. CF has no idea what "P" is. The database does - but CF does not.
The line above should probably be

p.autoid eq e.property_id_no

AND (p.mls_no EQ '#form.mls_no#')>

The line above should probably be

and p.mls_no = '#form.msl_no#'

Notice I removed "EQ" and swichted to =

<cfelse>no photo available</cfif>

The line above doesn't make sense either. You can't just output text for the
user in the middle of a query. Remember that everything between <cfquery>
tags goes to the database, not the user.

</cfquery>

If you want to say no photo avail, you would do...

<cfif photo_find.recordCount is 0>
sorry, blah blah
</cfif>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to