Bug Fixes 6th Nov : ps
This commit is contained in:
parent
5011e49d80
commit
1bd1f644c9
@ -68,7 +68,7 @@ class Books extends BaseController
|
||||
$session_uid = get_logged_user_id();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
$BooksModel = new BooksModel();
|
||||
$BooksModel = new BooksModel();
|
||||
$data = [
|
||||
|
||||
'title' => $this->request->getPost('title'),
|
||||
|
||||
@ -30,12 +30,12 @@ class BooksModel extends Model
|
||||
public function getnonMembershiplist($business_id)
|
||||
{
|
||||
$builder = $this->builder();
|
||||
$builder->select('books.book_id, books.title, books.price, books.duration,books.isactive,books.publisher,books.genre,books.language,books.publication_date,category.name as name');
|
||||
$builder->select('books.book_id, books.title, books.price, books.duration,books.isactive,books.publisher,books.genre,books.language,books.publication_date,GROUP_CONCAT(category.name SEPARATOR ',') as name');
|
||||
$builder->join('book_categories', 'book_categories.book_id = books.book_id', 'left');
|
||||
$builder->join('category', 'category.id = book_categories.category_id', 'left');
|
||||
$builder->where('books.business_id', $business_id);
|
||||
$builder->where('category.name !=', 'membership'); // Exclude books with the category name "membership"
|
||||
|
||||
$builder->groupBy('books.book_id');
|
||||
$query = $builder->get();
|
||||
|
||||
$books = [];
|
||||
|
||||
@ -199,6 +199,7 @@ public function getNonMembershipCategoryBooks()
|
||||
->join('book_categories', 'book_categories.book_id= books.book_id', 'left')
|
||||
->join('category','category.id=book_categories.category_id')
|
||||
->where('category.name !=', 'membership')
|
||||
->groupBy('books.book_id')
|
||||
->get()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user