I am trying to retrieve project numbers from a database in ascending order.
The rows look something like this:
-- project number --
1199.7
1053.2
1020
1023-D
1023-C
1023-B
50
34.3T
870-W
Here is my query for retrieving and sorting the data:
$this->db->select('Project');
$this->db->from('`active_projects`');
$this->db->order_by('Project + 0, Project');
Output for part of the table:
My question is, why is 127 stuck in the middle and not at the top? I'm thinking that it is looking at it the same as 1270 just without the appending 0 but I'm not sure. Can anybody help me out in fixing it?