Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!----get the rid using the mlnumber (replace xxxx below)--->
- <cfquery datasource="ccimls" name="GetRid" timeout="999">
- SELECT "data:Property:COND".ListingRid
- FROM "data:Property:COND" "data:Property:COND"
- WHERE ("data:Property:COND".MLNumber=xxxx))
- </cfquery>
- <!---get photo associated with listingRID (you could loop this depending on the photo flag) the :1 indicates to get the primary photo--->
- <cfquery datasource="ccimls" name="GetPhoto" timeout="999">
- SELECT * FROM object:binary:Property
- WHERE type='Photo' AND object_key='#GetRid.Computed_Column_1#:1'
- </cfquery>
- <!----write out the photo binary to the file server--->
- <cfimage action="write" destination="C:\inetpub\wwwroot \photos\xxxx.jpg" overwrite="true" source="#GetPhoto.COMPUTED_COLUMN_6#" />
Add Comment
Please, Sign In to add comment