I use both result()
and result_array()
.
Usually i like to get my result as array thats why i use result_array() mostly..
But i want to know which is the better approach that i should follow,
Which one of them is more efficient to use in regards to performance?
Here is the Example i am talking about in codeigniter queries
$query = $this->db->get();
$result = $query->result_array();
or is this should be the better approach??
$query = $this->db->get();
$result = $query->result();
also right now i am using result_array in my generic model.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…