friends i'm trying with mysql like and OR operator but i'm not getting exact output.
SELECT registration1.*,registration2.*
FROM registration1 JOIN registration2
ON registration2.emailid=registration1.emailid
WHERE(keyskills LIKE '%$search%') OR (keyskills='$search1')
this is my code. LIKE operator is working properly but keyskills='$search1' this is not working while using keyskills LIKE '%$search%' this. please let me know what mistake i did...
please friends it's very urgent help me....
What is the actual value of $search1 when you get to that point? (Not what you think it should be, but determine via debugging what it definitely is.)
If it's a text value, (which you are indicating by having quoted it), have you properly escaped any special characters with the applicable function for whichever database extension you are using?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Might I suggest that in copy and paste the actual PHP code being used to define the query here, in between [php]...[/php] tags, so that we can see exactly what you are doing?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks