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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -