This commit is contained in:
heama 2023-10-11 16:15:32 +05:30
parent 7c16a27747
commit fb844f9179
2 changed files with 5 additions and 3 deletions

View File

@ -137,7 +137,8 @@ public function updateData($table, $data, $where)
public function getCategoryBooks() public function getCategoryBooks()
{ {
return $this->db->table('books') return $this->db->table('books')
->join('category', 'books.category= category.id', 'left') ->join('book_categories', 'book_categories.book_id= books.book_id', 'left')
->join('category','category.id=book_categories.category_id')
->where('category.name', 'membership') ->where('category.name', 'membership')
->get() ->get()
->getResult(); ->getResult();
@ -146,7 +147,8 @@ public function updateData($table, $data, $where)
public function getNonMembershipCategoryBooks() public function getNonMembershipCategoryBooks()
{ {
return $this->db->table('books') return $this->db->table('books')
->join('category', 'books.category = category.id', 'left') ->join('book_categories', 'book_categories.book_id= books.book_id', 'left')
->join('category','category.id=book_categories.category_id')
->where('category.name !=', 'membership') ->where('category.name !=', 'membership')
->get() ->get()
->getResult(); ->getResult();

View File

@ -131,7 +131,7 @@
<li> <li>
<a href="<?= base_url()."subscribers_list"; ?>"> <a href="<?= base_url()."subscribers_list"; ?>">
<i class="ri-shield-user-line"></i> <i class="ri-shield-user-line"></i>
<span>Subscription </span> <span>Membership </span>
</a> </a>
</li> </li>
<li> <li>