A PHP Error was encountered

Severity: Warning

Message: Undefined array key "id"

Filename: controllers/Products.php

Line Number: 1253

Backtrace:

File: /home/u148832058/domains/eshopweb.store/public_html/application/controllers/Products.php
Line: 1253
Function: _error_handler

File: /home/u148832058/domains/eshopweb.store/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 'then 1 else 0 end) as rating_1, sum(case when CEILING(rating) = 2 AND product...' at line 1

SELECT count(pr.id) as total, sum(case when CEILING(rating) = 1 AND product_id = then 1 else 0 end) as rating_1, sum(case when CEILING(rating) = 2 AND product_id = then 1 else 0 end) as rating_2, sum(case when CEILING(rating) = 3 AND product_id = then 1 else 0 end) as rating_3, sum(case when CEILING(rating) = 4 AND product_id = then 1 else 0 end) as rating_4, sum(case when CEILING(rating) = 5 AND product_id = then 1 else 0 end) as rating_5 FROM `product_rating` `pr` WHERE `product_id` IS NULL

Filename: models/Rating_model.php

Line Number: 103