In Codeigniter, you can select all field from a table by simply doing:
$this->db->select('*')->from('table')->get()->result()
..and the code above will select all fields from that "table1
" and return the result!
Sometimes, you want to select specific fields in that table then you simply:
$this->db->select('fiels1, field2, field3, field4')->from('table')->get()->result()
..the above will return result with those specific fields
but sometimes, you want to select all fiedls EXCEPT specific fields and my question is this
How can I achieve this or do something like this
$this->db->select('*');
$this->db->exept('filed1, field2'); //please note this except()
$this->db->get('table')->result()
My wish is that I want to select all fields except those that are in the except function to avoid
$this->db->select('f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14.....');
I want to do this:
$this->db->except('f13, f6')->get('table')->result()