ok, I see how that could work (and did work), but while I understand
what you did, I'm surprised that it's the method to make this work.

I appreciate the help.   It looks mah-vel-ous.

>try...
>
><ul>
>        <cfoutput query="retrieve_archives" group="p_category">
>        <br>#p_category#
>        <cfoutput>
>            <li><a href=""> >        </cfoutput>
>        </cfoutput>
></ul>
>
>On Tue, 21 Sep 2004 14:36:14 -0400, Daniel Kessler <[EMAIL PROTECTED]> wrote:
>>  I'm having trouble grouping my records.  I retrieve the correct
>>  records.  I want them to be displayed in groups of the category.  For
>>  example:
>>
>>  Category1
>>     record1
>>     record1
>>
>>  Category2
>>     record3
>>     record4
>>
>>  I'm trying to make it look like the list in the center of this page:
>>  http://www.babycenter.com/polls/preconception
>>
>>  When I use group="category", it only loops  through the category
>>  once.  Should  I then do a cfloop and get the others of the group?
>>  Or in that case, should I just not group and loop through the whole
>>  thing, doing a category compare?
>>
>>  I figured that there might be a sensible way to group these and spit
>>  out all the records.
>>
>>  <cfquery name="retrieve_archives" datasource="eatsmart">
>>
>>        SELECT p_id,p_question,p_category,p_date_last_used,p_status
>>        FROM fsnep_polls
>>        WHERE p_status = 2
>>        ORDER BY p_category,p_date_last_used DESC
>>  </cfquery>
>>  <!-- content -->
>>
>>  <ul>
>>        <cfoutput query="retrieve_archives" group="p_category">
>>        <br>#p_category#
>>        <li><a href=""> >>        </cfoutput>
>>  </ul>
>>
>  > thanks.

--
Daniel Kessler

Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
301-405-2545 Phone
www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to