我想为简单的 ColdFusion 应用程序做简单的 CRUD 操作。我有简单的指导方针,但没有深入的指导,这对我来说有点棘手。任何可以为此提供简单而详细的解决方案的人。实际上我已经创建了数据库和表,http://localhost/phpmyadmin/
但是我如何在 CF-Builder 应用程序中使用数据库和表,我不知道。如果我遗漏了其他任何内容,请提及。谢谢,
2 回答
在有人关闭它之前,请查看 CFBuilder 的介绍,它向您展示如何连接到数据库:
http://refcardz.dzone.com/refcardz/getting-started-adobe
然后在http://www.learncfinaweek.com/上学习课程。如果您使用任何其他语言编写过 CRUD 应用程序,则只需学习 CF 语法即可执行相同的流程。
In CFBuilder 2 and 3, there is a view, "RDS Dataview" that shows the hosts (ColdFusion servers) you've provided connection information for.
Expanding a servername shows the datasources defined in its ColdFusion Administrator. You can drill down from Server to Datasource (schema) to the tables, to the fields. You can right-click a tableName and choose RDS Query Viewer and get a query builder, much like Microsoft Accesses, if you're familiar with that.
Alternatively you can just drag and drop tablenames and fieldnames directly into your hand-crafted code to save a lot of typing.
See Adobe Docs at http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec16ab8-7ff9.html There is also a CRUD creator described on that page, that can introspect a table and produce a CRUD cfc... not cruddy!