database - Query execution in codeigniter -


i have situation need fetch details of employee database using id , display them in browser.

$sql = "select * employeesalarypayment empid = ".$val['empid'].";";

$query = $this->db->query($sql);

these statements have written result array. problem how take single field/column array? have done correctly?

thanks in advance.

if query return single data database need use

$row = $query->row_array()  

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -