ITCOOKBOOK.com

 Options

Current Time:
Mon Sep 06, 2010 9:42 pm
View unanswered posts

Log in

Username:
Password:
Log me on automatically each visit

Topic Information

Listing items by one column's attributes

 
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7
View previous topic :: View next topic  
Author Message
Silver79
Fresher


Joined: 02 Dec 2006
Posts: 11
Location: Detroit, MI

PostPosted: Sun Dec 03, 2006 10:39 pm    Post subject: Listing items by one column's attributes Reply with quote

I have a database that categorizes events by year, title of event, venue, and city/state (that is to say, these are the columns in the table). I have inputted past events and plan to create an admin area so that future events can be added.

I want to these events on the user's side by year without having to repeat the year after every list item.

For example:
2005

* title of event - venue - city/state
* title of event - venue - city/state

2004

* etc...

How can I do this?
Back to top
View user's profile Send private message
cindy
Member


Joined: 02 Dec 2006
Posts: 22

PostPosted: Sun Dec 03, 2006 10:40 pm    Post subject: Reply with quote

Try this:

Code:
<cfoutput>
<h3>#year#</h3>

    <cfoutput>
  • #title# #venue# #city/state#

  • </cfoutput>

</cfoutput>

If you use the GROUP= attribute of CFOUTPUT, then the query must have an ORDER BY where the first column is the same column used in the GROUP= parameter for grouping the results


If not, you'll get results like:

2005
* some data
* some data
2004
* some data
2006
* some data
* some data
* some data
2005
some data
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Help US Help YOU

 

 

Please complete our short survey and save $17.50 on ITCOOKBOOK.COM.

 

 

Take a look at SAPTrends.com, a new blog dedicated to discussion of SAP Training trends in SAP ERP.

 

 

C# Interview Questions

 

.NET Interview Questions

 

Java Interview Questions

 

Python Interview Questions

 

ColdFusion Interview Questions

 

Linux Interview Questions

 

Linux LPIC 1 Certification Questions

 

Perl Programming Interview Questions