Testing Search with query: 'test'
SQL Query:
SELECT
p.id,
p.name,
p.sku,
p.unit_price,
p.units_per_case,
p.has_expiration_date,
p.shelf_life_days,
p.shelf_life_months,
p.shelf_life_years,
(SELECT file_path FROM product_images pi WHERE pi.product_id = p.id ORDER BY is_primary DESC, id ASC LIMIT 1) AS image_path,
(
SELECT IFNULL(SUM(i.quantity), 0)
FROM inventory i
JOIN locations l ON i.location_id = l.id
WHERE i.product_id = p.id
AND l.type = ?
) as stock_quantity,
-- Check for matched barcode multiplier
COALESCE(pb.quantity_multiplier, 1) as scanned_multiplier,
pb.description as barcode_description
FROM
products p
LEFT JOIN suppliers s ON p.supplier_id = s.id
LEFT JOIN product_barcodes pb ON p.id = pb.product_id AND pb.barcode = ?
WHERE (p.name LIKE ? OR p.sku LIKE ? OR s.name LIKE ? OR pb.barcode LIKE ?) GROUP BY p.id ORDER BY p.name ASC LIMIT 100
Types: ssssss
Fatal error: Uncaught mysqli_sql_exception: Expression #12 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gswms.pb.quantity_multiplier' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in C:\laragon\www\wms\diag_search.php:80
Stack trace:
#0 C:\laragon\www\wms\diag_search.php(80): mysqli->prepare('\r\n SELECT\r\n ...')
#1 {main}
thrown in C:\laragon\www\wms\diag_search.php on line 80