I am making a checkout/cashier software as hobby project, at the moment I am trying to come up with some way to search items in the database.
I got a database from my part-time job which contains about 50,000 items of computer related parts and I want to be able to search through them using keywords or EAN code.
If I enter this it shows the item
If I enter this it doesn't show the item
Am I doing something wrong in my MySQL Query? This is how I come up with these results:
SELECT *
FROM items
WHERE EAN LIKE '%" . addslashes($_GET['sTerm']) . "%'
OR itemName LIKE '%" . addslashes($_GET['sTerm']) . "%'
OR factoryId LIKE '%" . addslashes($_GET['sTerm']) . "%'
OR itemId LIKE '%" . addslashes($_GET['sTerm']) . "%';
Where addslashes($_GET['sTerm']) stands for the search bar contents so in this case AAA
or from the second image AAA Varta