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()
{
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')
->get()
->getResult();
@ -146,7 +147,8 @@ public function updateData($table, $data, $where)
public function getNonMembershipCategoryBooks()
{
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')
->get()
->getResult();

View File

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