目前这是我的查询:
$query_master = "SELECT DISTINCT * FROM `master_list` WHERE `plain_name` LIKE '%" . $searchterm . "%' OR `name` LIKE '%" . $searchterm . "%' OR `img` LIKE '%" . $searchterm . "%' OR `item_code` LIKE '%" . $searchterm . "%' OR `length` LIKE '%" . $searchterm . "%' ORDER BY `order_number`";
但是,当我使用它时,它会拉动长度甚至部分匹配的项目。如何使长度部分完全匹配?
我尝试将其更改为:
$query_master = "SELECT DISTINCT * FROM `master_list` WHERE `plain_name` LIKE '%" . $searchterm . "%' OR `name` LIKE '%" . $searchterm . "%' OR `img` LIKE '%" . $searchterm . "%' OR `item_code` LIKE '%" . $searchterm . "%' OR `length` == '%" . $searchterm . "%' ORDER BY `order_number`";
以几种不同的方式,它打破了页面。
慕莱坞森