私は次のような結果を得ようとしていますselect * from bookdetails where display_id = $id with few foreign key join condition
次のクエリを作成しましたが、次のようなエラーが表示されます。
致命的なエラー: C:\xampp\htdocs\project の非オブジェクトでメンバ関数 num_rows() を 432 行目で呼び出します。つまり、*if ($query->num_rows() > 0)...
Model.php
public function get_all_book_list_atHomeTop($id, $limit, $start)
{
$this->load->database();
$this->db->limit($limit, $start);
$this->db->get_where('bookdetails', array('display_id' => $id));
//-------join condition ------------------
//------------Ends here Join condition
$query = $this->db->get();
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
$data[] = $row;
}
return $data;
}
return false;
}