Copy link to clipboard
Copied
Hi everybody,
I would like to alter a table within a Coldfusion application. Can I do that with cfscript ? If, does anybody know how I can do that ?
Thanks.
Is there a cfscript equivalent for the CFQUERY Tag ?
Yup: Query.cfc:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html
--
Adam
Copy link to clipboard
Copied
What kind of table? A database table? Why would you want to do that through ColdFusion?
Copy link to clipboard
Copied
If you want to alter a database table, you can use CFQUERY to run that, just like you use it to run standard SQL DML (SELECT, INSERT, UPDATE, DELETE) commands. That kind of SQL command is called DDL.
That said, you generally don't want to run DDL commands from applications for both security and common-sense reasons, and your database login will need a higher level of privilege to do this than it would to run DML commands.
Dave Watts, CTO, Fig Leaf Software
Copy link to clipboard
Copied
THank you very much for your answers,
what I want to do is to build an Air Application for maintaining my Tables in a Mysql system. If you know Ruby on Rails, there you have a Feature called "Migrations" - that's what I want to do with that application. It is not planned as a "normal" application, it should make it easier to keep the different versions between the development and production Environment up to date.
Is there a cfscript equivalent for the CFQUERY Tag ?
Regards
Copy link to clipboard
Copied
There is in ColdFusion 9, yes.As long as you have permissions, it's just the same as running any other query.
Copy link to clipboard
Copied
Is there a cfscript equivalent for the CFQUERY Tag ?
Yup: Query.cfc:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html
--
Adam
Copy link to clipboard
Copied
Thanks a lot - that was the one I needed.