SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Grabbing data

  1. #1
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grabbing data

    Hi,

    If i have two tables, one to hold categories and one to hold articles set up like this :

    Cats
    ======
    CatdID
    CatTitle
    Order

    Articles
    ======
    AID
    Category
    Title
    Article
    Date

    What is the most efficient way to print out each category followed by the title of all the articles that belong to that category. It can easily done by having one while loop inside another, but is there a more efficient way?

    Thanks for any help
    Sean

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    If you could phrase your question in terms of your table names and field names that you went to all the trouble to include, it would make it clear what you want to do.

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Solved thanks to freakysid.

    Sean
    Last edited by seanf; Jun 4, 2001 at 12:54.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •