Welcome Guest, Not a member yet? Register   Sign In
form_dropdown and selected
#5

[eluser]Asinox[/eluser]
Well my way:
Code:
function listCombox(){ //COMBOX
        
        $query = $this->db->get('table');
        if($query->num_rows()>0){
            $data[] = 'Select ONE';
            foreach($query->result_array() as $row){
                $data[$row['id']] = $row['name'];
            }
            return $data;
        }else{
            return FALSE;
        }
        $query->free_result();
    }
maybe is not perfect but working for me


Messages In This Thread
form_dropdown and selected - by El Forum - 04-20-2009, 12:45 PM
form_dropdown and selected - by El Forum - 04-20-2009, 12:56 PM
form_dropdown and selected - by El Forum - 04-20-2009, 01:01 PM
form_dropdown and selected - by El Forum - 04-20-2009, 06:45 PM
form_dropdown and selected - by El Forum - 04-20-2009, 11:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB