final public function setListOrderBy($fields, $direction = "ASC")
    {

        $direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC'), TRUE)) ? ' ' . $direction : ' ASC';
        $orderby = NULL;
        //Clean up the order by field list
        if (!empty($fields) && !is_array($fields)) {
            $temp = array();
            foreach (explode(',', $fields) as $part) {
                $part = trim($part);
                $temp[] = $part;
            }

            $orderby = implode(', ', $temp);
        } else if (is_array($fields)) {
            $temp = array();
            foreach ($fields as $field) {
                $part = trim($field);
                $temp[] = $part;
            }
            $orderby = implode(', ', $temp);
        }


        if (!empty($orderby)) {
            $this->listOrderByStatement = "\nORDER BY " . $orderby . $direction;
        }
        //Return this object
        return $this;
    }