This content has been marked as final. Show 5 replies
Write query-data to a file on HD.
I think that was a solution I had come up with about 4 years ago when I was trying to do the same thing with database queries, but I comepletely forgot about it. Is that gonna make my server extremely vulnerable using CFFile everytime do anything involving a query. Forget vulnerable, how much will that slow things down if I have a loop of queries? Luckily, I only have one per page this time, but what about future situations? Either way, thank you very much for your reply. Whenever I have a problem that's got me banging my head on my desk, I always goto you guys!
Overall it is a sub-ideal way.
- No file (compiled-code) caching by CF.
- File-writing can be rather slow on VirtualMachine-servers.
Better write the files to disc from start and only save the file-name/path in DB.
I'm suprised Ben Forta's never gone "hmm, I wonder if we can create a tag so we can execute cf code from a variable". I mean we have evaluate, but that will treat every word in my variable as a variable itself. We need like an "execute()" or something. Maybe I can take a month off and develop it or something =D
Creating a tag or UDF-function that does the write-File -> include file -> delete-file is rather simple, a matter of 15 minutes or so!
But as mentioned I'd consider it bad practice ...