roxiroxi Posted December 13, 2006 Share Posted December 13, 2006 Hi people, anyone has any example of how i can add these operators into my search???? I cant get anyI mean, when a user enter the film batman and returns, it searches films with batman and returns wordsThanks Quote Link to comment Share on other sites More sharing options...
micky1955 Posted December 14, 2006 Share Posted December 14, 2006 you can use AND & OR as follows:$search1 = "Batman";$search2 = "Returns";SELECT * FROM DBASE WHERE Title LIKE '%$search1%' [color=red]OR[/color] Title LIKE '%$search2%' ;SELECT * FROM DBASE WHERE Title LIKE '%$search1%' [color=red]AND[/color] Title LIKE '%$search2%' ;using [color=red]LIKE[/color] with the [color=red]%%[/color] option means that for a result the search text must be found somewhere in the field. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.