Product Listing Sort Order

Hi All,
   Trying to sort product listing in natural numerical order. 
Currently the order shows: 1,100,5,51,52, ....
Natural order should be:     1,5,51,52,100

Thank You
Have a look in includes/functions/func_catalog.inc.php where the mysql syntax for sort order is stated.

This will be a problem for product names with alphanumeric characters.

ORDER BY CAST(pi.name as SIGNED INTEGER) ASC
Hi Tim,
   Not sure if I'm putting that in the right place, No change in order.
where (p.id
        ". (!empty($filter['sql_where']) ? "$sql_andor (". $filter['sql_where'] .")" : null) ."
        ". (!empty($filter['product_name']) ? "$sql_andor pi.name as SIGNED INTEGER) ASC". database::input($filter['product_name']) ."%'" : null) ."

Thank You
Try change

    switch ($filter['sort']) {
      case 'name':
        $sql_outer_sort[] = "name asc";
To

    switch ($filter['sort']) {
      case 'name':
        $sql_outer_sort[] = "CAST(name as SIGNED INTEGER)";
Hi Time,
 Yes that worked perfect. 
Thank You. 
P.S. You should put a tip jar somewhere.....I would throw a buck in every time you respond to my non-program understanding, non SQL, PHP...I don't think I will ever understand it...
I think other users would agree.
No need for tips. Spend your money on an add-on. :)