Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Adjust <cfdump var="#GetMetaData to show MySQL column data type?

Posted on 2011-05-05
3
Medium Priority
?
614 Views
Last Modified: 2012-05-11
I'm using <cfdump var="#GetMetaData( db)#> to show my query column data type, is there away to have it display like this

Name, nametype

instead of how the array shows now?
0
Comment
Question by:overcolor
3 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 35698123
I've not used it but according to the docs, cfdump has show & hide attributes for columns which might get you what you want

show
For a query, this is a column name or a comma-delimited list of column names. For a structure, this is a key or a comma-delimited list of keys.
hide
      

hide
For a query, this is a column name or a comma-delimited list of column names. For a structure, this is a key or a comma-delimited list of keys. If you specify a structure element that doesn't exist, ColdFusion ignores it and does not generate an error.
0
 
LVL 53

Accepted Solution

by:
_agx_ earned 2000 total points
ID: 35699467
I don't think it's possible with metadata (array of structures).  But you can loop and reformat the results yourself.

<!--- convert to a list if preferred ...) --->
<cfset arr = []>
<cfloop array="#GetMetaData(qryData)#" index="elem">
      <cfset arrayAppend(arr, elem.name &", "& elem.TypeName)>
</cfloop>
<cfdump var="#arr#">
0
 

Author Closing Comment

by:overcolor
ID: 35700782
Perfect
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question