quicky one, I'm creating search query and I'm stuck with one problem... with this code.
this code is working perfectly but I need to add this validation to it, problem comes when  I add this validation  userid='$id', the search query is not working with it. Can someone put me on the right way? I'm missing something here.  The value of $id is true for sure. This is the whole code part for this search query the result is ok without validation. 
else if($_POST['filter1'] == "po_boravistu")
        {
            if($row_12['admin_id'] < 1)
                {
            //FILTER 10 po boravištu
$sqlCommand = "SELECT * FROM albums WHERE userid='$id' AND WHERE bor_mjesto LIKE '%$searchquery%' OR bor_kucni_broj LIKE '%$searchquery%' OR
bor_postanski_broj LIKE '%$searchquery%' OR bor_ulica LIKE '%$searchquery%' OR bor_opcina LIKE '%$searchquery%'";
                }
        }
Whole script is working fine without userid='$id' in it, but when I add that validation script drops dead. 
 
     
    