sanjay_zed 0 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.... Link to post Share on other sites
gristoi 23 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' Link to post Share on other sites
Recommended Posts
Archived
This topic is now archived and is closed to further replies.