ColdFusion和从MySQL获取数据 [英] ColdFusion and getting data from MySQL

查看:99
本文介绍了ColdFusion和从MySQL获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CF网站上工作,需要从MySQL表中获取数据。



我可以创建CFQuery,并检查返回的记录,获取返回的记录并循环遍历它们并从每行的特定字段获取数据。



我可以写if / end if,etc,我只是不记得如何

解决方案



使用firstname列进行了一个名为the_query的查询:

 < cfoutput query =#the_query#> 
#firstName#... etc< br>
< / cfoutput>


I am working on a CF site and need to get data from MySQL tables.

I can create the CFQuery fine and check for records returned, but how do I take the records returned and loop through them and get data from specific fields in each row.

I can write while if/end if, etc, I just dont recall how to get access to the data.

-JAson

解决方案

Assuming you made a query called the_query with a firstname column:

<cfoutput query="#the_query#">
   #firstName# ... etc <br>
</cfoutput>

这篇关于ColdFusion和从MySQL获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆