php - PDO like Query is Case Sensitive -


i don't appropriate results search using pdo because pdo search case sensitive, want case insensitive.

i have query, returns data matches if there alphabet a small in database, don't result if search capital alphabet a.

$stmt = $conn->prepare("select room, guest_name, guest_first_name, confirmation_no, departure, pwd reservation_general_2 guest_first_name ? or guest_name ?"); $stmt->execute(array('%'.$searchfilter.'%','%'.$searchfilter.'%' )); 

is there anyway fix query make case insensitive?

im using oracle 11g xpress edition database.

usually following works

…where lower(guest_first_name) ? or lower(guest_name like) ? $stmt->execute(array('%'.strtolower($searchfilter).'%','%'.strtolower($searchfilter).'%' )); 

Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -