# NB 10.01.16 if (
# NB 10.01.16 isset($this->db->sort)
# NB 10.01.16 and isset($this->db->sort[$this->name])
-# NB 10.01.16 ) $this->db->pset('sort',$this->db->sort[$this->name]);
- if ($this->order_by) $this->pset('sort',$this->order_by);
+# NB 10.01.16 ) $this->db->pset('orderby',$this->db->sort[$this->name]);
+ if ($this->order_by) $this->pset('orderby',$this->order_by);
return $this->fields();
}
$html = '';
# Asc
- $sel = ( $this->p('sort')=="$name asc") ? " sel" : "";
- $html .= '<a title="First In (asc)" class="sort asc'.$sel.'" href="'.$this->url_list("sort","$name asc").'">'
+ $sel = ( $this->p('orderby')=="$name asc") ? " sel" : "";
+ $html .= '<a title="First In (asc)" class="sort asc'.$sel.'" href="'.$this->url_list('orderby',"$name asc").'">'
.'<span class="asc">↓</span>'
.'</a>';
$html .= ' ';
$html .= ' ';
# Desc
- $sel = ( $this->p('sort')=="$name desc") ? " sel" : "";
- $html .= '<a title="Last In (desc)" class="sort desc'.$sel.'" href="'.$this->url_list("sort","$name desc").'">'
+ $sel = ( $this->p('orderby')=="$name desc") ? " sel" : "";
+ $html .= '<a title="Last In (desc)" class="sort desc'.$sel.'" href="'.$this->url_list('orderby',"$name desc").'">'
.'<span class="desc">↑</span>'
.'</a>';
$sql .= " FROM ".$this->sql_name();
$sql .= $where;
- if ($this->p('sort')) $sql .= ' ORDER BY '.$this->p('sort');
+ if ($this->p('orderby')) $sql .= ' ORDER BY '.$this->p('orderby');
if ($this->p('limit')) {
$limit = $this->p('limit');