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? Link to comment https://forums.phpfreaks.com/topic/215735-possible-to-strtolower-on-store_result-funtion/ Share on other sites More sharing options...
Zane Posted October 13, 2010 Share Posted October 13, 2010 SELECT LOWER(city) .... Link to comment https://forums.phpfreaks.com/topic/215735-possible-to-strtolower-on-store_result-funtion/#findComment-1121625 Share on other sites More sharing options...
ricmetal Posted October 13, 2010 Author Share Posted October 13, 2010 thanks zanus Link to comment https://forums.phpfreaks.com/topic/215735-possible-to-strtolower-on-store_result-funtion/#findComment-1121750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.