Bug Fixes 6th Nov : ps

This commit is contained in:
VE10-Sanjeev 2023-11-06 18:37:53 +05:30
parent 5011e49d80
commit 1bd1f644c9
3 changed files with 4 additions and 3 deletions

View File

@ -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 = [];

View File

@ -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();
}