SEARCH FOR MULTIPLE CATEGORY MYSQL

hamedy

New Member
lets say i have a table like this\[code\]ITEM------id | Name | idCat-------------------------1 Bridgestone A 1,5,112. Velg 2,33. Bridgestone B 12,4Category-----------idCat | Name --------------1 Ban2. Velg3. Velg Silver4. Ban Luar5. Ban dalam11. Ban Special\[/code\]And then for example i want to search Velg..And i get only Velg because the idCat has '2' and i using LIKE '2%'But the problem is.. when i search BAn that the idCat is 1, i getBridgestone A and Bridgestone B, because the Bridgestone B has idCat 12 and it will be matched if i using LIKE '1%'My question is, how to query to perform a search that only match with "," separated..sorry for my bad english
 
Back
Top