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

git - TortoiseGit does not show commit log properly -

string - Using python and postgres, variables within execute function? -