Welcome Guest, Not a member yet? Register   Sign In
Sort results by number of using
#1

[eluser]someone Smile[/eluser]
Hello!

I would like to create model's function which will shows most used categories. I have two tables - news and categories.

Table news: ID_article, title, content, date, ID_category, url
Table categories: ID_category, title, description, url

So this function must get number of using for each inserted category and this must be limited with 5.

Like this output:
Number of using | Name | Description
23 First First category
21 Second Second category
8 Third Third category

Thanks for help!


Messages In This Thread
Sort results by number of using - by El Forum - 03-09-2012, 11:31 AM
Sort results by number of using - by El Forum - 03-09-2012, 03:20 PM
Sort results by number of using - by El Forum - 03-09-2012, 11:07 PM
Sort results by number of using - by El Forum - 03-14-2012, 10:22 AM
Sort results by number of using - by El Forum - 03-23-2012, 06:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB