• Hello there. I’m brand new to this forum, and don’t know if I’m in the right spot, so bear with me.

    I have a very basic and limited understanding of php – and I’m struggling to reverse the order of a database call. I’ve learned to make calls one certain way, but I’ve come across a theme, where the programmers do it differently. Can anyone tell me where the alteration should be? Output is numerical, so I need it sorted by numbers, from highest to lowest. And is it at all possible?

    Any help is appreciated. : )

    <h5><?php echo __CS('event_trans_category_filter', 'Filter By'); ?>: </h5>
    					<ul id="portfolio-item-filter<?php echo $counter_gal?>">
                                <li><a data-value="all" class="gdl-button active" href="#"><?php _e('All', CSDOMAIN); ?></a></li>
    							<?php
    								if($row <> ''){
    									$categories = get_categories( array('child_of' => $row->term_id, 'taxonomy' => 'album-category', 'hide_empty' => 0) );
    								}else{
    									$categories = get_categories( array('taxonomy' => 'album-category', 'hide_empty' => 0) );
    								}
                                    if($categories <> ""){
                                        foreach ( $categories as $category ) {
                                    ?>
    							<li><a data-value="<?php echo $category->term_id;?>" class="gdl-button" href="#"><?php echo $category->name;?></a></li>
    								<?php }?>
  • The topic ‘Database call desc/asc – new to this forum’ is closed to new replies.