Guest User

Untitled

a guest
Nov 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!----get the rid using the mlnumber (replace xxxx below)--->
  2. <cfquery datasource="ccimls" name="GetRid" timeout="999">  
  3.      SELECT  "data:Property:COND".ListingRid
  4.      FROM    "data:Property:COND" "data:Property:COND"
  5.     WHERE   ("data:Property:COND".MLNumber=xxxx))
  6. </cfquery>
  7.  
  8. <!---get photo associated with listingRID (you could loop this depending on the photo flag) the :1 indicates to get the primary photo--->
  9. <cfquery datasource="ccimls" name="GetPhoto" timeout="999">
  10.     SELECT * FROM object:binary:Property
  11.     WHERE type='Photo' AND object_key='#GetRid.Computed_Column_1#:1'
  12. </cfquery>
  13.  
  14. <!----write out the photo binary to the file server--->
  15. <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