Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Group By with headings for each section
Old 03-25-2008, 05:08 PM Group By with headings for each section
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Okay, here is what I need/want to do...

Not only sort by group, I want to break it down to display in sections...

Displayed like this:

HTML Code:
Group1
  Item 1
  Item 2
  Item 3
 
Group2
  Item 4
  Item 5
  Item 6
 
Group 3
  Item 7
  Item 8
  Item 9
etc.
Can this be done with one server call? I believe I need to use GROUP BY but can't figure out how to make it work to display the info in sections like this.

any ideas..?

Thanks all,

Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
 
Register now for full access!
Old 03-27-2008, 03:11 PM Re: Group By with headings for each section
Junior Talker

Posts: 2
Trades: 0
Hmm I think you might be looking at this wrong.

You probably don't need to grab all the information within a single SQL query.

Show us the exact information you are looking to display like that, you should be able to do even 3 SQL queries to pull the info.

Also it's hard for us to give you code if we don't know the table names and fields.
__________________

Please login or register to view this content. Registration is FREE
and articles.

Please login or register to view this content. Registration is FREE
review.

Please login or register to view this content. Registration is FREE
reviews.
alex74 is offline
Reply With Quote
View Public Profile
 
Old 03-27-2008, 04:17 PM Re: Group By with headings for each section
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
I know that I can do 3 seperate runs to the server for this, however, for this to be truly dynamic, for instance, what if I do not know what values are in the group field. At any given time there may be 3 or 7 or more vaules in this field. If I want to display all records for each of these values, it needs to be produced on the fly...
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Reply     « Reply to Group By with headings for each section
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16590 seconds with 12 queries