Search field not working in stats_products_purchased.php

Description

after using the search box in stats_products_purchased.php you get sql error.

Fix

Code:

$products_query_raw .= (isset($keywords) ? " (op.products_name LIKE '%" . $keywords . "%' OR op.products_model LIKE '%" . $keywords . "%' OR manufacturers_name LIKE '%" . $keywords . "%' OR manufacturers_name LIKE '%" . $keywords . "%' OR o.customers_name LIKE '%" . $keywords . "%') and " : '');

change to:

$products_query_raw .= (isset($keywords) ? " (op.products_name LIKE '%" . $keywords . "%' OR op.products_model LIKE '%" . $keywords . "%' OR m.manufacturers_name LIKE '%" . $keywords . "%' OR o.customers_name LIKE '%" . $keywords . "%') and " : '');

Environment

None

Steps to reproduce

None

Status

Assignee

Michael Sasek

Reporter

greg

Labels

None

Severity

Minor

Components

Fix versions

Affects versions

v2.5.3

Priority

Configure