Thundarfoot Posted January 25, 2008 Share Posted January 25, 2008 I am working with this query, particularly the $name% the $name gets filled from a drop down form. $query_Cards = "SELECT Name, `Class`, Drops, Details FROM skill_cards WHERE skill_cards.`Class` LIKE '$name%' ORDER BY Name ASC"; The fields use a period . between names and can have 1 name or many names. name1. name2. name3 If $name = name 2 or 3 then no records are returned I can change the . to anything other than a comma if that will help. Thank you in advance for your time and any help you can lend Quote Link to comment https://forums.phpfreaks.com/topic/87708-solved-query-needs-a-replacement-ty/ Share on other sites More sharing options...
Thundarfoot Posted January 25, 2008 Author Share Posted January 25, 2008 well removing all the periods from the column so that the data is now name1 name2 name3 still will only return records if the first word in the series is the one that $name is set to, but if its not first in line its left out. Quote Link to comment https://forums.phpfreaks.com/topic/87708-solved-query-needs-a-replacement-ty/#findComment-448644 Share on other sites More sharing options...
Thundarfoot Posted January 25, 2008 Author Share Posted January 25, 2008 solved I needed to use REGEXP '$name' Quote Link to comment https://forums.phpfreaks.com/topic/87708-solved-query-needs-a-replacement-ty/#findComment-448725 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.