ricmetal Posted October 12, 2010 Share Posted October 12, 2010 hi guys here are my settings: * Server: Localhost via UNIX socket * Server version: 5.0.91-community * MySQL charset: UTF-8 Unicode (utf8) Web server * MySQL client version: 5.0.91 * PHP extension: mysql my situation: i am retrieving data from the database with the mysqli extension. ... $stmt = $mysqli->prepare("SELECT city FROM world WHERE city = ? "); $stmt->bind_param('s',$city); $stmt->execute(); $stmt->store_result(); if($stmt->num_rows == 0){ //no rows } ... i don't want to change any setting to the default configuration set by a script i installed, if i don't have to but i need to test input data (from a html form) against existing data in the dbase for duplicated entries, without taking into account text case. when i test against case-sensitivity, according to testing, an input "lisbon" is different from an existing dbase entry of "Lisbon" but i want it to be the same. i am turning all input data from the html form into lower case before i test it against the data retrieved from the dbase but i need to have the dbase data retrieved turned to lower case as well. anyone have an idea how i would go about doing this? Quote Link to comment Share on other sites More sharing options...
Zane Posted October 13, 2010 Share Posted October 13, 2010 SELECT LOWER(city) .... Quote Link to comment Share on other sites More sharing options...
ricmetal Posted October 13, 2010 Author Share Posted October 13, 2010 thanks zanus 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.