Welcome Guest, Not a member yet? Register   Sign In
how to code for sort and filter
#2

[eluser]fs_xyz[/eluser]
For sorting you should use $this->db->order_by('<field name>','asc or desc'); ( ascending for small to big / a-z, descending for the other way around )

To display no duplicates you can use $this->db->group_by('<field name>').
Foe easier use, fill field name by primary key of your table.

for example :

Code:
$this->db->select('*');
$this->db->from('A');
$this->db->group_by('id_a');
$this->db->order_by('nm_a','asc');


Messages In This Thread
how to code for sort and filter - by El Forum - 12-02-2009, 04:23 PM
how to code for sort and filter - by El Forum - 12-02-2009, 08:06 PM
how to code for sort and filter - by El Forum - 12-03-2009, 05:48 AM
how to code for sort and filter - by El Forum - 12-03-2009, 07:03 AM
how to code for sort and filter - by El Forum - 12-03-2009, 08:04 PM
how to code for sort and filter - by El Forum - 12-03-2009, 08:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB