anser316 Posted April 18, 2008 Share Posted April 18, 2008 The user types something in a textbox. e.g. s3 echo "<td><input type=text name=dname></td>"; $dname=$_POST(dname); This is the end of MYSQL statement AND dname LIKE '%$dname%'. If i wanted to get 'sample3', s3 will not work, because the letters have to be together, 'sam' would work. how can i get 'sample3' from typing in 's3' Link to comment https://forums.phpfreaks.com/topic/101646-solved-php-mysql-like/ Share on other sites More sharing options...
AV1611 Posted April 18, 2008 Share Posted April 18, 2008 funny question... like 's%3' will yield s3 sss3 ss sssss s s s s3 etc... you can maybe explode $dname then pick the letters? that would give you array(s,a,m,p,l,e) then maybe parse in the % or whatever...? Link to comment https://forums.phpfreaks.com/topic/101646-solved-php-mysql-like/#findComment-520066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.