[eluser]Craig Ward[/eluser]
Hi,
I am getting the following error and I am not sure how to solve it
------------
A PHP Error was encountered
Severity: 4096
Message: Object of class CI_DB_mysql_result could not be converted to string
Filename: models/ManageProperty_model.php
Line Number: 21
------------
the model is
------------
<?php
class ManageProperty_model extends Model
{
function get_property_details($p_id, &$b_id)
{
$this->db->where('ID', $p_id);
$q = $this->db->get('properties');
$b_id = $this->db->query('SELECT BRANCH_ID FROM properties WHERE ID = "$p_id"');
if($q->num_rows() >0)
{
foreach ($q->result() as $row)
{
$data[] = $row;
}
return $data;
}
}
function get_property_images($p_id)
{
$this->db->where('property_id', $p_id);
$q = $this->db->get('media_image');
if($q->num_rows() >0)
{
foreach ($q->result() as $row)
{
$data[] = $row;
}
return $data;
}
}
}