WHERE lower LIKE statement
Posted: Tue Jul 29, 2008 3:10 am
Hi
Am puzzled as why this bit of code won't work for me.
it works if use either
or
but not when I add the OR statement it only gives me the result on what comes second in the statement. any ideas? 
Am puzzled as why this bit of code won't work for me.
Code: Select all
if (isset($_GET['wordsearch'])){
$word = strtolower($_GET['wordsearch']);
echo $word.'= $word <BR>';
$query .= " WHERE lower(lname) OR lower(fname) LIKE'%$word%' ";
Code: Select all
$query .= " WHERE lower(lname) LIKE'%$word%' ";Code: Select all
$query .= " WHERE lower(fname) LIKE'%$word%' ";