A PHP Error was encountered

Severity: Notice

Message: Undefined variable: level

Filename: models/Home_model.php

Line Number: 121

Backtrace:

File: /home/tejpublishing/public_html/application/models/Home_model.php
Line: 121
Function: _error_handler

File: /home/tejpublishing/public_html/application/controllers/Books.php
Line: 34
Function: get_related_books

File: /home/tejpublishing/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/tejpublishing/public_html/system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 573

Backtrace:

File: /home/tejpublishing/public_html/application/models/Home_model.php
Line: 121
Function: query

File: /home/tejpublishing/public_html/application/controllers/Books.php
Line: 34
Function: get_related_books

File: /home/tejpublishing/public_html/index.php
Line: 315
Function: require_once

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND book_id != 54' at line 1

SELECT * FROM `books` WHERE level_id= AND book_id != 54

Filename: models/Home_model.php

Line Number: 121