dachshund Posted July 29, 2009 Share Posted July 29, 2009 How can I put LIKE '%interview%' and '%feature%' as well? $sql="SELECT * FROM content WHERE `section` LIKE '%interview%' ORDER BY date DESC LIMIT 1"; Link to comment https://forums.phpfreaks.com/topic/168020-solved-2-like/ Share on other sites More sharing options...
abazoskib Posted July 29, 2009 Share Posted July 29, 2009 "like" this: $sql="SELECT * FROM content WHERE `section` LIKE '%interview%' AND xxx LIKE '%feature%' ORDER BY date DESC LIMIT 1"; just re read your post, if you want section to be like '%interview%' or '%feature%' then use OR $sql="SELECT * FROM content WHERE `section` LIKE '%interview%' OR `section` LIKE '%feature%' ORDER BY date DESC LIMIT 1"; Link to comment https://forums.phpfreaks.com/topic/168020-solved-2-like/#findComment-886190 Share on other sites More sharing options...
dachshund Posted July 29, 2009 Author Share Posted July 29, 2009 yeah was OR, thanks! Link to comment https://forums.phpfreaks.com/topic/168020-solved-2-like/#findComment-886192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.