MyBB Community Forums

Full Version: Sort threatprefix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, how to sort prefixes by ID, not by name?

[Image: Capture2.png] [Image: Capture1.jpg]
My guess is that you have to change the core code to use a different sortby option.

You might get away with just editing how the cache is stored.

inc/class_datacache.php

$query = $db->simple_select("threadprefixes", "*", "", array('order_by' => 'prefix', 'order_dir' => 'ASC'));

Change that to sort by pid then rebuild the cache and see if that does it for you.
(12-11-2017, 08:57 PM)labrocca Wrote: [ -> ]My guess is that you have to change the core code to use a different sortby option.

You might get away with just editing how the cache is stored.  

inc/class_datacache.php

$query = $db->simple_select("threadprefixes", "*", "", array('order_by' => 'prefix', 'order_dir' => 'ASC'));

Change that to sort by pid then rebuild the cache and see if that does it for you.

Tank you! Working fine!


$query = $db->simple_select("threadprefixes", "*", "", array('order_by' => 'pid', 'order_dir' => 'ASC'));