私には2つの機能がgetCompanyDetails
あり、getHostingDetails
最初のデータベースは正常に動作しますgetCompanyDetails
が、getHostingDetails
Trying to get property of non-object
getCompanyDetails:
コントローラ: $data['companyName'] = $this->quote->getCompanyDetails()->companyName;
モデル:
public function getCompanyDetails()
{
$this->db->select('companyName,companySlogan,companyContact,
companyEmail,companyWebsite,companyPhone,
companyFax,companyAddress');
$this->db->from('companyDetails');
$result = $this->db->get();
if($result->num_rows()<1)
{
return FALSE;
}else{
return $result->row();
}
}
getHostingDetails:
コントローラ:
$data['hostingRequired'] = $this->quote->getHostingDetails()->hostingRequired;
モデル:
public function getHostingDetails()
{
$this->db->select('hostingRequired,domainRequired,domainToBeReged,
domaintoBeReged0,domainTransfer,domainToBeTransfered,
domainToBeTransfered0,currentHosting');
$this->db->from('hostingDetails');
$result = $this->db->get();
if($result->num_rows()<1)
{
return FALSE;
}else{
return $result->row();
}
}