Ignore:
Timestamp:
Nov 29, 2009, 3:06:16 PM (14 years ago)
Author:
nikrou
Message:

Feature_1255:

  • bug fix : function pwg_db_get_recent_period_expression
  • add extra fields for select based on "order by"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r4367 r4387  
    3333
    3434//----------------------------------------------------------- generic functions
     35function get_extra_fiels($order_by_fields)
     36{
     37  $fields = str_ireplace(array(' order by ', ' desc', ' asc'),
     38                         array('', '', ''),
     39                         $order_by_fields
     40                         );
     41  if (!empty($fields))
     42  {
     43    $fields = ','.$fields;
     44  }
     45  return $fields;
     46}
    3547
    3648// The function get_moment returns a float value coresponding to the number
Note: See TracChangeset for help on using the changeset viewer.