Welcome Guest, Not a member yet? Register   Sign In
Asking about performance of data retrieval
#1

[eluser]dimazarno[/eluser]
hello,

i write code like this, i'm using variable $type for select and return value from single field, whether this will affects the performance of data retrieval?

Code:
//get one field value
    function get_shop($type){
        $this->db->select($type);
        $this->db->from('shop');
        $query = $this->db->get();    
        foreach ($query->result() as $row)
        {
            return $row->$type;
        }        
    }

thanks.


Messages In This Thread
Asking about performance of data retrieval - by El Forum - 09-10-2009, 07:12 PM
Asking about performance of data retrieval - by El Forum - 09-11-2009, 12:01 AM
Asking about performance of data retrieval - by El Forum - 09-11-2009, 04:02 AM
Asking about performance of data retrieval - by El Forum - 09-11-2009, 07:12 AM
Asking about performance of data retrieval - by El Forum - 09-11-2009, 07:31 AM
Asking about performance of data retrieval - by El Forum - 09-11-2009, 04:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB