Re: Finding schema details with CF 6.1 ?
which db are you using? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321090 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Finding schema details with CF 6.1 ?
as an example, MySQL supports SHOW FULL tables sql statement, which will return all tables in this db associated with your sf dsn. however, you need to know the actual name of your mysql db to access the results of this query, because the name of the column which contains table names is TABLES_IN_[name-of-your-mysql-db-here] (without square brackets of course). not sure if ms sql server has a similar sql statement it supports, but i suppose it does... Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Azadi Saryev wrote: which db are you using? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321091 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
MySQL - Original Message - From: Azadi Saryev az...@sabai-dee.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 12:58 PM Subject: Re: Finding schema details with CF 6.1 ? which db are you using? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321092 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Finding schema details with CF 6.1 ?
seen my follow-up post? it was posted same time you posted your reply... Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: MySQL - Original Message - From: Azadi Saryev az...@sabai-dee.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 12:58 PM Subject: Re: Finding schema details with CF 6.1 ? which db are you using? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321093 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
What database are you using? There are different dialects on how to tease that out. I would take a look at sql.cfc for the MSSQL . I have the sql for MySQL some where in my archive if you need it.. H! On Mon, Mar 30, 2009 at 6:57 AM, BobSharp bobsh...@ntlworld.com wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12840 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321094 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
MySQL See previous posts in this thread. I have done it for a list of Tables, now need to extract FULL details of individual Tables. - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 1:55 PM Subject: Re: Finding schema details with CF 6.1 ? What database are you using? There are different dialects on how to tease that out. I would take a look at sql.cfc for the MSSQL . I have the sql for MySQL some where in my archive if you need it.. H! On Mon, Mar 30, 2009 at 6:57 AM, BobSharp bobsh...@ntlworld.com wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12840 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321095 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
Yes, thanks very much Works well. What is the equivalent for columns ? Could I output the Table's schema details ... (column name, data type, size, format, NULL allowed ?, PrimaryKey, Indexes) ...ie: like a DUMP, without the data ? - Original Message - From: Azadi Saryev az...@sabai-dee.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 1:36 PM Subject: Re: Finding schema details with CF 6.1 ? seen my follow-up post? it was posted same time you posted your reply... Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: MySQL - Original Message - From: Azadi Saryev az...@sabai-dee.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 12:58 PM Subject: Re: Finding schema details with CF 6.1 ? which db are you using? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321096 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
Sorry about that I had my coffee now... I wrote a query to do that a while back. I can't find it now. :-( Brian Rinaldi has a CFC in his CFC generator (Illudium) project that will tease this out for you. http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/mysql.cfc There are other cfc's in there for other DB's http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/ HTH G! On Mon, Mar 30, 2009 at 9:19 AM, BobSharp bobsh...@ntlworld.com wrote: MySQL See previous posts in this thread. I have done it for a list of Tables, now need to extract FULL details of individual Tables. - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 1:55 PM Subject: Re: Finding schema details with CF 6.1 ? What database are you using? There are different dialects on how to tease that out. I would take a look at sql.cfc for the MSSQL . I have the sql for MySQL some where in my archive if you need it.. H! On Mon, Mar 30, 2009 at 6:57 AM, BobSharp bobsh...@ntlworld.com wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12840 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321097 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern'] http://dev.mysql.com/doc/refman/5.0/en/show-columns.html check out whole section 12.5.5 in MySQL reference manual for more SHOW options: http://dev.mysql.com/doc/refman/5.0/en/show.html Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ BobSharp wrote: Yes, thanks very much Works well. What is the equivalent for columns ? Could I output the Table's schema details ... (column name, data type, size, format, NULL allowed ?, PrimaryKey, Indexes) ...ie: like a DUMP, without the data ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321098 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
What is the equivalent for columns ? Could I output the Table's schema details ... (column name, data type, size, format, NULL allowed ?, PrimaryKey, Indexes) ...ie: like a DUMP, without the data ? Use information_schema to access database metadata http://dev.mysql.com/doc/refman/5.0/en/information-schema.html ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321103 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Finding schema details with CF 6.1 ?
Thanks, but the CFC is a bit beyond me at the moment. How would I insert it in a CFM page ? - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 2:25 PM Subject: Re: Finding schema details with CF 6.1 ? Sorry about that I had my coffee now... I wrote a query to do that a while back. I can't find it now. :-( Brian Rinaldi has a CFC in his CFC generator (Illudium) project that will tease this out for you. http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/mysql.cfc There are other cfc's in there for other DB's http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/ HTH G! On Mon, Mar 30, 2009 at 9:19 AM, BobSharp bobsh...@ntlworld.com wrote: MySQL See previous posts in this thread. I have done it for a list of Tables, now need to extract FULL details of individual Tables. - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 1:55 PM Subject: Re: Finding schema details with CF 6.1 ? What database are you using? There are different dialects on how to tease that out. I would take a look at sql.cfc for the MSSQL . I have the sql for MySQL some where in my archive if you need it.. H! On Mon, Mar 30, 2009 at 6:57 AM, BobSharp bobsh...@ntlworld.com wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12840 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321104 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
Correct me if I'm wrong, but it sounds like you're actually requesting that someone go through that CFC for you and turn it into something that you can copy and paste into a template. On Mon, Mar 30, 2009 at 10:11 AM, BobSharp bobsh...@ntlworld.com wrote: Thanks, but the CFC is a bit beyond me at the moment. How would I insert it in a CFM page ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321105 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Finding schema details with CF 6.1 ?
This will get you what you want. SELECT * FROM INFORMATION_SCHEMA.Columns WHERE table_name = 'your_table' On Mon, Mar 30, 2009 at 10:11 AM, BobSharp bobsh...@ntlworld.com wrote: Thanks, but the CFC is a bit beyond me at the moment. How would I insert it in a CFM page ? - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 2:25 PM Subject: Re: Finding schema details with CF 6.1 ? Sorry about that I had my coffee now... I wrote a query to do that a while back. I can't find it now. :-( Brian Rinaldi has a CFC in his CFC generator (Illudium) project that will tease this out for you. http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/mysql.cfc There are other cfc's in there for other DB's http://code.google.com/p/cfcgenerator/source/browse/trunk/cfcgenerator/com/cf/model/datasource/ HTH G! On Mon, Mar 30, 2009 at 9:19 AM, BobSharp bobsh...@ntlworld.com wrote: MySQL See previous posts in this thread. I have done it for a list of Tables, now need to extract FULL details of individual Tables. - Original Message - From: Gerald Guido gerald.gu...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 1:55 PM Subject: Re: Finding schema details with CF 6.1 ? What database are you using? There are different dialects on how to tease that out. I would take a look at sql.cfc for the MSSQL . I have the sql for MySQL some where in my archive if you need it.. H! On Mon, Mar 30, 2009 at 6:57 AM, BobSharp bobsh...@ntlworld.com wrote: Can I use CF 6.1 (including hot fixes) to see what tables are in the schema ? -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12840 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321107 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
No. Asking how to put it into a .cfm page with tidy output. I'm new to CF and haven't seen CFCs or CFfunction before. - Original Message - From: Brian Kotek brian...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Monday, March 30, 2009 4:02 PM Subject: Re: Finding schema details with CF 6.1 ? Correct me if I'm wrong, but it sounds like you're actually requesting that someone go through that CFC for you and turn it into something that you can copy and paste into a template. On Mon, Mar 30, 2009 at 10:11 AM, BobSharp bobsh...@ntlworld.com wrote: Thanks, but the CFC is a bit beyond me at the moment. How would I insert it in a CFM page ? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:32 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
How to put what into a .cfm file? If you want to get column data for a table, you can simply run a query against the information_schema table: SELECT * FROM INFORMATION_SCHEMA.Columns WHERE table_name = 'yourtablename' The CFC shows one way you can do this and encapsulate it (and other related behavior) into a single, reusable object. Pointing you to it was most likely just to give you a starting point if you wanted to go down that road. If you're unfamiliar with CFCs, trying to use it is probably not the best idea since it is part of a larger project. On Mon, Mar 30, 2009 at 2:35 PM, BobSharp bobsh...@ntlworld.com wrote: No. Asking how to put it into a .cfm page with tidy output. I'm new to CF and haven't seen CFCs or CFfunction before. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321115 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Finding schema details with CF 6.1 ?
Bob, a quick tip on CfQuery. If use a SELECT * you can get at list of the columns of a table using the #Queryname.ColumnList# syntax Try this: cfquery name=qgetschema datasource=Yourdsn SELECT * FROM INFORMATION_SCHEMA.Columns WHERE table_name = 'yourtablename' /cfquery cfoutputqgetschema.ColumnList/cfoutput CFdump will return the column headers as well. HTH G On Mon, Mar 30, 2009 at 3:29 PM, Brian Kotek brian...@gmail.com wrote: How to put what into a .cfm file? If you want to get column data for a table, you can simply run a query against the information_schema table: SELECT * FROM INFORMATION_SCHEMA.Columns WHERE table_name = 'yourtablename' The CFC shows one way you can do this and encapsulate it (and other related behavior) into a single, reusable object. Pointing you to it was most likely just to give you a starting point if you wanted to go down that road. If you're unfamiliar with CFCs, trying to use it is probably not the best idea since it is part of a larger project. On Mon, Mar 3 -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321116 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4