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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -