05.02.2021, 15:18
You have "WHERE name LIKE ? AND name LIKE ?" which will only find something when both parameters are the same and there is an object with exactly the same name as both parameters.
When you use % wildcard on both sides it find objects where name contains parameter A and contains parameter B. For example it can find object named "aabbcc" when the first parameter is "aa" and the second one is "bb".
When you use % wildcard on both sides it find objects where name contains parameter A and contains parameter B. For example it can find object named "aabbcc" when the first parameter is "aa" and the second one is "bb".