Jump to content

Pilot List Out of Order


flyalaska

Recommended Posts

try it

add in core / app.config

/* For PILOTS_ORDER_BY use p.[column_name] [ASC/DESC] */

Config::Set('PILOT_ORDER_BY', 'p.pilotid ASC');

This won't work because this is the sorting for the default schedules. flyalaska is using dataTables pagination (I think) which again overrides the sorting.

There is probably something in the dataTables docs about sorting with this, but what I've done in the past is just a simple check, but it's annoying when you have to do it for multiple numbers.

<?php
// Check the length of the pilotid and make sure it's less than 4 characters long
if(strlen($pilot->pilotid) < 4) {
echo '0'.$pilot->pilotid; // put a zero before the pilotid
} else {
echo $pilot->pilotid; // just show the pilotid
}
?>

To not show the zero, you could maybe add a div to not echo the 0 onto the page with style="display:none;" or something. Have a mess around with the above and see if you can get it working.

I do suggest looking into the dataTables docs as well and see if you ca find anything else.

Link to comment
Share on other sites

It is an issue with data tables. I removed it and it works perfect. We dont start with a 0. We start with 100. The issue happened after we reached id 1000 bunched all the ids that start with a 1 first, Not in Pilots number.

Yeah, that's what I'm saying. The above was meerly just an example of how to sort them (not ideal).

Instead of

100

1000

200

etc.

It would be

0100

0200

1000

But again, not ideal. Not sure how to fix this one.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...