sanjay_zed Posted March 1, 2012 Share Posted March 1, 2012 i have table called location_state , the fields are stateid and statename. for example : i have inserted the statename as karnataka. in my search module, if i try to search this record with "KARNATAKA " . it is not displaying the above record. i hav used query as select * from location_state where state_name like '%KARNATAKA%'; THE Query is working fine if i write like ---select * from location_state where state_name like '%karnataka%'; how would i search if an user is typing in uppercase letter while searching. pls help guys.... Quote Link to comment Share on other sites More sharing options...
gristoi Posted March 2, 2012 Share Posted March 2, 2012 you need to format the search value before you run the actual search query. so when the value entered is passed to the php code, <?php // if $location = KARNATAKA $location = strtolower($location); // would change it to 'karnataka' Quote Link to comment 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.