From: Nicolas Boisselier Date: Tue, 1 Mar 2016 03:01:34 +0000 (+0000) Subject: rename sort to order by X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=c821cbb103292aa09f38f21ce4f0e37c4fe25f9a;p=nb.git rename sort to order by --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index ef40de97..aedb37bc 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -76,8 +76,8 @@ class table extends nb { # 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(); } @@ -400,8 +400,8 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $html = ''; # Asc - $sel = ( $this->p('sort')=="$name asc") ? " sel" : ""; - $html .= '' + $sel = ( $this->p('orderby')=="$name asc") ? " sel" : ""; + $html .= '' .'' .''; $html .= ' '; @@ -411,8 +411,8 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $html .= ' '; # Desc - $sel = ( $this->p('sort')=="$name desc") ? " sel" : ""; - $html .= '' + $sel = ( $this->p('orderby')=="$name desc") ? " sel" : ""; + $html .= '' .'' .''; @@ -590,7 +590,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $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');