anarchoi Posted February 6, 2008 Share Posted February 6, 2008 i have a query using LIKE argument to verify if a field contains a specific text... I was just wondering how it would be possible to add a second text to check for... i.e. i'd like to check if $field is LIKE $text1 OR $text2 Quote Link to comment https://forums.phpfreaks.com/topic/89654-using-multiple-like-arguments-in-a-query/ Share on other sites More sharing options...
teng84 Posted February 6, 2008 Share Posted February 6, 2008 select * from table where name like 'teng' or last like 'teng' Quote Link to comment https://forums.phpfreaks.com/topic/89654-using-multiple-like-arguments-in-a-query/#findComment-459342 Share on other sites More sharing options...
clearstatcache Posted February 6, 2008 Share Posted February 6, 2008 select * from table where FIELD like '%$text1%' or FIELD like '%$text2%' Quote Link to comment https://forums.phpfreaks.com/topic/89654-using-multiple-like-arguments-in-a-query/#findComment-459347 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.