Welcome Guest, Not a member yet? Register   Sign In
[show single recordo] usual problem...
#1

[eluser]Unknown[/eluser]
Hi everyone, my name is Andrea, im new in codeigniter, and i have little problem when i try to show a single record of my database.
When i want to show all records of my table (brokerage) it's work fine, but the problem is the single record Big Grin

controller:
Code:
public function view()
{
  $data['record'] = $this->broker_model->getBroker();

  $this->load->view('templates/single', $data);
}


modello:
Code:
function viewBroker()
{
  $query = $this->db->get('brokerage', array('id' => $id));
  return $query->result_array();
}

view:
Quote:<?php echo $record->descrizione; ?>

error:
Message: Trying to get property of non-object



errore che mi da:
Message: Trying to get property of non-object




Theme © iAndrew 2016 - Forum software by © MyBB