Hi, just always put whatever you are going group in your CFOUTPUT into your
ORDER BY SQL statement.
In your particular case it should be like this:
***************************************
SELECT record_id, tiptopic
FROM daily_tip_copy2
ORDER BY tiptopic, record_id ASC
**************************************
Regards,
Misha
-----Original Message-----
From: John Barrett [mailto:[email protected]]
Sent: Sunday, January 04, 2009 2:46 AM
To: cf-newbie
Subject: master/detail page with groups
Hi,
I am not sure if this is possible, but I am trying to make a master/detail
page to administer the database(insert, update, delete)
You can see this here:
http://gotnutrients.net/admin/forms/masterForm.cfm
When I try to use group="tiptopic" groupcasesensitive="no" in my cfquery, it
still seems to show duplicates. Now I would like to have if there is a
duplicate, when I click on it to go to the detail page showing all of them.
So Food would have 2.
As anybody ever done something like this before? I feel really stuck on this
one.
My Code:
<!--- Query the database for all tip topics --->
<cfquery name="GetTips" datasource="johnbarrett">
SELECT record_id, tiptopic
FROM daily_tip_copy2
ORDER BY record_id ASC
</cfquery>
<html>
<head>
<title>tip topic Update Menu</title>
<style type="text/css">
TH {
background-color : #C0C0C0;
}
TD {
background-color : #E7E7E7;
}
</style>
</head>
<body>
<div align="Center">
<h3>Tips Profiles</h3>
<table border="1">
<tr>
<th>tip topics</th>
<th>Action</th>
</tr>
<!--- Output a table containing each tip topic. Create dynamic
links to edit and delete templates. Pass the ID
associated with each record in the URL of the link --->
<cfoutput query="GetTips" group="tiptopic" groupcasesensitive="no">
<tr>
<td>#tiptopic#</td>
<td><a href="updateform3.cfm?record_id=#record_id#">Update</a> |
<a href="DeleteForm3.cfm?record_id=#record_id#">Delete</a></td>
</tr>
</cfoutput>
<tr>
<td colspan="2" align="Center"><a href="insert_form.cfm">Add</a> a
new record</td>
</tr>
</table>
</div>
</body>
</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-newbie/message.cfm/messageid:4261
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15