single line active record field locator - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: single line active record field locator (/showthread.php?tid=36997) |
single line active record field locator - El Forum - 12-22-2010 [eluser]shanemesser[/eluser] Is there a way to do this in a single line: $all_rows = $this->db->get_where('cms_widget_data_html', array('id' => 1)->result(); return $all_rows[0]->first_name; for example: $single_value = $this->db->get_where('TABLE',array(XYZ))->result(ROW_#)->field_name where ROW_# is a given record and field is just the field in the table. |