Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Sort news categories after alphabetic letters

Asked Modified Viewed 3,809 times
M
mikejezz
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
asked
Newbie

Hey guys, I wonder if it is possible to sort news categories after alphabetic letters?

http://beta.gamehub.dk/news_cats.php

It can be a bit of a mess to find news about a related game, if it is not listed in alphabetic order.

You can with articles and such, But I cannot really find it regarding news categories.
0 replies

4 posts

P
PeaceLaced
P
PHP-Fusion MAIN Support Team
PHP-Fusion USA NSS Admin
  • Member, joined since
  • Contributed 154 posts on the community forums.
  • Started 23 threads in the forums
answered
Member

Quote

mikejezz wrote:

Hey guys, I wonder if it is possible to sort news categories after alphabetic letters?

http://beta.gamehub.dk/news_cats.php

It can be a bit of a mess to find news about a related game, if it is not listed in alphabetic order.

You can with articles and such, But I cannot really find it regarding news categories.


The below line is what orders the news output. I believe news_datestamp DESC should be replaced with news_subject ASC. I am a little confused on the ASC and DESC with regards to strings though. Neither may be needed. Maybe someone can shed some light.

ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
0 replies
M
mikejezz
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Newbie

I found a much easier way, I would love to post it but I forgot since coding is not easy for me :)
0 replies
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
answered
Senior Member

yea im interested too :)
i think it should be include in next php fusion
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

news_cats.php find...

Line 53...

$result = dbquery("SELECT news_cat_id, news_cat_name FROM ".DB_NEWS_CATS." ORDER BY news_cat_id");


Change it to...

$result = dbquery("SELECT news_cat_id, news_cat_name FROM ".DB_NEWS_CATS." ORDER BY news_cat_name");
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

P
P
PHP-Fusion MAIN Support Team
PHP-Fusion USA NSS Admin
  • Member, joined since
  • Contributed 154 posts on the community forums.
  • Started 23 threads in the forums
C
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet