[eluser]jamie young[/eluser]
Opinions on performance of these two blocks of pseudoish code (assuming PHP5)
Code:
$query = $this->db->query('SELECT * FROM table LIMIT 1');
$row = $query->row();
echo $row->col1;
echo $row->col2;
echo $row->col3;
Code:
$query = $this->db->query('SELECT * FROM table LIMIT 1');
echo $query->row()->col1;
echo $query->row()->col2;
echo $query->row()->col3;
Is there any performance difference at all between the above two blocks of code? I know they both work, just not sure what the long term effects of using one method over the other will have on a large CI project.