Welcome Guest, Not a member yet? Register   Sign In
clear select
#1

(This post was last modified: 01-28-2023, 04:55 AM by futurewebs.)

Hi folks,
Using CI3
is there a way to clear / flush the select array ?

heres a basic example to try and explain better


PHP Code:
$this->db->select('user.*');


if (
$rs_type == 'small_select'){

// clear the select options and start again
 
$this->db->select('user.user_id'); // need to only select single item

 
$query $this->db->get('users');
 
$result $query->result();
 
 } else {

 
// here we select everything as normal

 
$query $this->db->get('users');
 
$result $query->result();

 } 


thanks in advance
Reply


Messages In This Thread
clear select - by futurewebs - 01-28-2023, 04:53 AM
RE: clear select - by InsiteFX - 01-28-2023, 05:58 AM
RE: clear select - by futurewebs - 01-28-2023, 06:05 AM
RE: clear select - by superior - 01-28-2023, 08:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB