I am trying to get sum of a column values in mysql table with the codeigniter query as
$this->db
->query("Select SUM(tb1.amount) from table1 tb1 inner join table2 tb2 on tb2.Id=tb1.Id Where tb2.Status='1'")
->result()
it give me error as array to string conversion
I need just a number such count(amount) returns number of rows with num_row()