mysql - Using LIKE on CONCATed columns from two seperate tables -


I have these two tables and I should be able to search on brand.name and product.NAME like. I have been unable to use CONCAT with this in conjunction with JOINS, so it is above my pager.

Is this possible?

Wanted behavior

Result:

  Nike shoes Nike shirts   

Products b>

  id | NAME | Brand IDID | 1 | Shoes | 1 | 2 | Pants | 2 | 3 | Shorts | 3 | 4 | Shirt | 1 | 5 | Socks 2 |   

Brand

  id | NAME | 1 | Nike | 2 | Adidas | 3 | Hummala |    

You have to join two tables and then have to run it. A Warning: If you do a direct CONCAT, then "Nike Shoes" will never match, because what will you have "NikeShoes". Product Zone Brand Current (Product Brand ID = Brand ID) from SELECT ... where concrete (product name, '', brand name) '% iK sho%' like; Edit: She said, I agree with other posters - it will be very beneficial to see brands and products separately unless you have "like Google" search, where the user wants Whatever I can find, in that case I try to modify the UI.

Comments