SEVIZ Posted May 11, 2009 Share Posted May 11, 2009 Here is my current query: SELECT name,num,sup FROM mytable WHERE name='Thomas' I do not get a return because the name is Bill Thomas. How can I do a WHERE that searches for data that includes the name, as opposed to IS the entire name? I am sure its easy. But I am missing it. Link to comment https://forums.phpfreaks.com/topic/157640-solved-where-includes-instead-of-where-exact/ Share on other sites More sharing options...
Ken2k7 Posted May 11, 2009 Share Posted May 11, 2009 SELECT name, num, sup FROM mytable WHERE name LIKE '%Thomas' Link to comment https://forums.phpfreaks.com/topic/157640-solved-where-includes-instead-of-where-exact/#findComment-831348 Share on other sites More sharing options...
SEVIZ Posted May 11, 2009 Author Share Posted May 11, 2009 That does not work. No entries are returned. Link to comment https://forums.phpfreaks.com/topic/157640-solved-where-includes-instead-of-where-exact/#findComment-831947 Share on other sites More sharing options...
pugboy Posted May 11, 2009 Share Posted May 11, 2009 http://www.htmlite.com/mysql011.php The following code would return anything that has Thomas in it. SELECT name, num, sup FROM mytable WHERE name LIKE '%Thomas%' Link to comment https://forums.phpfreaks.com/topic/157640-solved-where-includes-instead-of-where-exact/#findComment-832034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.