Here is my dilemma. I have a MySQL LIKE search for profiles in an area but the profiles themselves can have multiple areas stored. My problem is that areas of 1, 10, and 100 are showing up as the same but I want it to limit to only the 1, 10, or 100 depending on my query. Same thing goes for area of 2 not showing area 12, 20, or 200 because it has 2 in it. Pretty much want to make the numbers be unique and I dunno if its a code deal or I have to change my table collation.
For example, this is what I have in my PHP. I also have a serv value but I am assuming the code will be the same since they are numeric and each profile has multiple values:
Where a profile may have these saved in their areas: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,100, 101, 102"PHP Code:$profile = "SELECT * FROM profiles WHERE area LIKE '%".$areaid."%' AND serv LIKE '%".$servid."%' AND active='2'";
I went on the MySQL page and tried '".$areaid."%' and '".$areaid."_' and '".$areaid."\_' but I either get no results or all of them.
Any tips would be great.![]()









Bookmarks