Build Master/Detail page in ColdFusion
Master.cfm
<cfquery name="rsMaster" datasource="udnewbie">
SELECT CatID, CatTitle
FROM tblCat
</cfquery>
<html>
<head>
</head>
<body>
<cfoutput query="rsMaster">
<a href="Details.cfm?CatID=#rsMaster.CatID#">#rsMaster.CatTitle#</a><br>
</cfoutput>
</body>
</html>
Details.cfm
<cfquery name="rsDetails" datasource="udnewbie">
SELECT SubCatID, SubCatTitle, CatID
FROM tblSubCat
WHERE CatID = #URL.CatID#
</cfquery>
<html>
<head>
</head>
<body>
<cfoutput query="rsDetails">
#rsDetails.SubCatTitle#<br>
</cfoutput>
</body>
</html>
lol, believe me now o)
Go Back
Omar Elbaga
Starting out as a fine artist, Omar Elbaga gradually moved to computer graphic arts. He was particularly amazed by the power of the World Wide Web, so he embarked upon building small-scale sites for fun utilizing HTML and his Art background. Falling in love with designing web pages and its potential, he began a career in web design. Omar has since been in the web development field for several years. With his head in computer books nearly 24 hours a day, Omar moved on to enhance his skills from web design to web programming.
Most of his work involves building database-driven web sites for small companies. Omar is currently running a popular Dreamweaver MX resource site named dmxfire.com
Comments
Be the first to write a comment
You must me logged in to write a comment.