Welcome Guest, Not a member yet? Register   Sign In
using LIKE in SQL query with activerecord
#5

[eluser]mandril[/eluser]
Code:
AND p1.tags = p2.tags --//the like is unnecessary here (you're comparing two columns directly)

The like is necessary because i don't want to compare the fields.. i want to know if the have tags in common..

PRODUCT 1 has tags: cellphone apple touchscreen iphone
PRODUCT 2 has tags: music ipod touchscreen

so it will relate them with the touchscreen tag.. the field call tags in the product table have lots of tags separated by blank spaces.

I will check your solution, thnx for responding Big Grin


Messages In This Thread
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 02:11 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 04:38 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 05:02 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 05:24 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 06:20 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 06:44 PM
using LIKE in SQL query with activerecord - by El Forum - 02-04-2009, 10:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB