Results 1 to 2 of 2

Thread: Listing all articles in a category

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Listing all articles in a category

    Table Structure:

    Table
    article
    articlecategory
    author
    category

    The category table lists the main categories while the articlecategory table is a join that lists the

    category id and the article id.

    On my main page I have all articles listed. However, I would like other pages to contain only stories

    from category x, y etc.

    I run the query:

    Code:
    $query = 'SELECT * FROM articlecategory WHERE categoryid=3';
    but it returns nothing.

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Can you please provide the structure of your tables. I don't think the table names you mentioned in the posting does not server their purpose as they supposed.

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
  •