Just ONE Question

ONE

Only two questions about global poverty have been asked in the history of modern presidential debates.

It's a shocking figure and in 2008, we need debate moderator Jim Lehrer to ask John McCain and Barack Obama "Just ONE question" on their plans to fight global poverty.

I just took action with the ONE Campaign and you can too, here:

http://www.one.org/debates/?rc=debatestaf

JibJab Does it Again with High School Musical 3

I have always been impressed with the work done by the folks over at JibJab®. I've been following them for quite some time and I'm sure many of you recall the "This Land!" video from 2004. And who could forget "Ahnuld for Governor?" The first one I remember seeing was "Founding Fathers" way back in 2000.

I've also been using their "Starring You!" application since its inception. I liked it so much I even paid a few bucks awhile back to be able to share a Snoop Dogg video starring my wife, a co-worker and myself via email and post it online for my family and friends to see (and laugh). If you've ever played around with the "Starring You!" application, then you know how much fun it is to see your friends and family as they dance, sing, talk and everything else.

Anyway, just in time for the release of the next High School Musical movie, they've thrown together a new music video for the "Starring You!" series. What an awesome way to promote the movie, don't ya think? I thought I would go ahead and share a personalized version starring my wife and your's truly. Enjoy!

Using ColdFusion's CFDBInfo to Dynamically Output Database Columns and Tables

The ColdFusion tag CFDBInfo was introduced in ColdFusion 8. I finally got around to playing with it and thought someone other than me might find this useful.


<!--- this dsn is used throughout the examples --->
<cfset REQUEST.dsn="cfartgallery" />

<!--- databases --->
<h4>DATABASES</h4>
<cfdbinfo datasource="#REQUEST.dsn#" name="getDBs" type="dbnames" />
<cfdump var="#getDBs#" />

This should return something similar to:

List all tables associated with the dsn:


<!--- tables --->
<h4>ALL TABLES</h4>
<cfdbinfo datasource="#REQUEST.dsn#" name="getTables" type="tables" />
<cfdump var="#getTables#" />

You should now see something similar to:

As you can see, you might not want all tables returned. So, unless you want or need information on all of the system tables, you could use something like this:


<h4>NON SYSTEM TABLES</h4>
<!--- using query of query to scrap any sys tables --->
<cfquery name="getNonSysTables" dbtype="query">
SELECT REMARKS, TABLE_NAME, TABLE_TYPE
FROM getTables
WHERE TABLE_TYPE <> 'SYSTEM TABLE'
</cfquery>
<cfdump var="#getNonSysTables#" />

Now you should see this:

Dynamically generate all tables along with its detailed information:


<!--- columns --->
<h4>ALL TABLES: DETAILS</h4>
<hr size="1" />
<cfoutput query="getTables">
    <h4>#getTables.TABLE_NAME#</h4>
    <cfdbinfo datasource="#REQUEST.dsn#" name="getColumns" type="columns" table="#getTables.TABLE_NAME#" />
    <cfdump var="#getColumns#" />
</cfoutput>

This begins to generate a long list of tables and the info:

Once again, maybe you don't want all tables. If that's the case, then you could use a method similar to the following to ignore system tables:


<h4>NON-SYS TABLES: DETAILS (Using CFIF on getTables query)</h4>
<hr size="1" />
<cfoutput query="getTables">
    <!--- scrap the system tables --->
    <cfif left(getTables.TABLE_NAME, 3) NEQ 'SYS'>
        <h4>#getTables.TABLE_NAME#</h4>
        <cfdbinfo datasource="#REQUEST.dsn#" name="getColumns" type="columns" table="#getTables.TABLE_NAME#" />
        <cfdump var="#getColumns#" />
    </cfif>
</cfoutput>

Here you'll see only non-system tables and their related information:

And yet, another method to list non-system related tables:


<h4>NON-SYS TABLES: DETAILS (Using output of Query of Query - getNonSysTables)</h4>
<hr size="1" />
<cfoutput query="getNonSysTables">
    <h4>#getNonSysTables.TABLE_NAME#</h4>
    <cfdbinfo datasource="#REQUEST.dsn#" name="getColumns" type="columns" table="#getNonSysTables.TABLE_NAME#" />
    <cfdump var="#getColumns#" />
</cfoutput>

As you can see, CFDBInfo is quite a powerful little tag which can return a ton of useful information. Hope it helps you in your next project. Enjoy!

More Entries

© 2026, Stephen J. Withington, Jr.  |  Hosted by Hostek.com

Creative Commons License   |   This work is licensed under a Creative Commons Attribution 3.0 Unported License.