php - return categories ordered by article date -


I have a website with blog articles. A post can contain 1 or more categories. Now I want a query that is all Returns the list of categories, according to the date of the blog order. I have experimented with one experiment in a SELECT query, but that does not work ... How can I do this and return the categories according to the date of the article?

Table blog:

  | ID ------ | Title ------------------ | Date ------ | | 1 | Test Title | 2014-05-05 | | 2 | Test Title 2 | 2014-04-01 | | 3 | Last Test Title | 2014-02-02 | | 4 | Another blog item | 2014-01-06 |   

table categories:

  | ID | Category ----- | | 1 | Computer | | 2 | Home | | 3 | Work |   

table blogs_categories:

  | Blog_id | Category_id | | 1 | 1 | | 2 | 1 | | 4 | 2 |    

Use simple affiliate and select only specific data from categories Sector Leave Segments in Segments Bloggate BC On (CID = BCCCTI) BEF (BID = BCBLIID) B.Ed.



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -