Jump to content

how to get article categories in list of articles

Recommended Posts

Hi guys,

I'm new in PHP. I cannot find tutorial about how to get all categories article is listed in together with article title, author printed on the article list.


I have 4 tables in DB:

articles = DB for articles detailse: id, title, user_id, post_date

articles_categories = id, category_id

categories = category_id, category_name

users = user_id, user_name, user_mail


I want to do this:




Which script logic do you suggest? Any kind of help is welcomed.

Edited by jasom
Link to post
Share on other sites

wait minute how can you join that's table even each table there is no same field to join it, do i wrong this issue?

You can do INNER JOIN but it will results with duplicated rows. Sollution will consist from some kind of PHP hack.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...