A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'id_produk' of non-object

Filename: controllers/Webpage.php

Line Number: 71

Backtrace:

File: /home/btuqafhv/public_html/application/controllers/Webpage.php
Line: 71
Function: _error_handler

File: /home/btuqafhv/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: Warning

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

Filename: core/Common.php

Line Number: 578

Backtrace:

File: /home/btuqafhv/public_html/application/models/My_query.php
Line: 13
Function: query

File: /home/btuqafhv/public_html/application/controllers/Webpage.php
Line: 76
Function: query

File: /home/btuqafhv/public_html/index.php
Line: 289
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 type_produk = "" GROUP BY id_produk ORDER BY jarak_harga DESC LIMIT 3' at line 1

SELECT * , SUM(hargaasli_produk - harga_produk) as jarak_harga from produk WHERE id_produk != AND type_produk = "" GROUP BY id_produk ORDER BY jarak_harga DESC LIMIT 3

Filename: models/My_query.php

Line Number: 13