<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Changing default order of categories (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Changing default order of categories
#691
phvfd221 (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Changing default order of categories 3 Years, 4 Months ago Karma: 0  
I need to order my categories by there id, how would i do that?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#694
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Changing default order of categories 3 Years, 4 Months ago Karma: 9  
If I understand what you are asking for ...

edit include/functions.php near lines 41 - 55 find ..

Code:

$gc_query = sql_query(" select $tb_categories.Category as cat_name from $tb_categories where ID=$PID");
just change the last line to ...
Code:

ID=$PID order by ID asc");
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#696
phvfd221 (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Changing default order of categories 3 Years, 4 Months ago Karma: 0  
added
Code:

order by ID asc
it did not do anything
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#700
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Changing default order of categories 3 Years, 4 Months ago Karma: 9  
then I apparently don't understand what you are asking for.. please try and be more descriptive of what you want..

"it is currently like this ....

but I want it like this . . . . "

normally categories are shown in alphabetical order... so, really not sure what you are after
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#704
phvfd221 (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Changing default order of categories 3 Years, 4 Months ago Karma: 0  
Currently: Yes, its in alphabetical order but would like it like this;

Penn Hills Departments
Local Departments
Other Departments in PA
Other Departments Out of State
Related Links
E-mail/ Admin
Electronics Sites
Photo Sites
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#706
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Changing default order of categories 3 Years, 4 Months ago Karma: 9  
Ok, to get them in the order they were entered, try this ...

edit /include/functions.php down near line # 601 .. find

Code:

order by cat_name
Change that to . .
Code:

order by cat_id ASC
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008