php mysql动态选择用户输入的查询

I have a form with checkboxes, input fields. The user can select or enter something and with that a query is being build. Now when the user selects only one checkbox, the query works perfect, but when selecting 2 checkboxes, I get a count of zero in return. This is what the query returns:

SELECT nbs_contact_events.contact_id, nbs_contacts.nbs_contact_id, nbs_contacts.nbs_contact_sur
FROM nbs_contacts
LEFT JOIN nbs_contact_events ON nbs_contact_events.contact_id = nbs_contacts.nbs_contact_id
WHERE nbs_contact_events.event_id = 1
  AND nbs_contact_events.event_id = 21

returned count: 0

The php (pdo) code for making that selection is as followed:

$this->pdo = $this->connectMySql();
        $query = "SELECT nbs_contact_events.contact_id, nbs_contacts.nbs_contact_id, nbs_contacts.nbs_contact_sur 
                      FROM 
                        nbs_contacts 
                      LEFT JOIN 
                        nbs_contact_events 
                      ON 
                        nbs_contact_events.contact_id = nbs_contacts.nbs_contact_id";
        if(isset($eventlist) || isset($nbslist) || isset($nbs_relativeto)){
            $query .= " WHERE ";

            if(isset($eventlist)){                  
                $source = array_filter($eventlist);
                $conditions = array();
                foreach($source as $field => $value){

                    $conditions[] = "nbs_contact_events.event_id = " . mysql_real_escape_string($value);

                    //$conditions[] = "event_id = :event_id";
                }
                $where = implode(" AND ", $conditions);
                $query .= $where;
            }
        }
        $stmt = $this->pdo->prepare($query);
        print_r($query);
        if(!$stmt->execute($conditions)){
            return false;
        }

        $nart = $stmt->rowCount();
        echo "returned count: " . $nart;
        if ($nart == 0) {
            return false;
        }

What is wrong with the query, why isn't it returning anything? I know the ID 1 and 21 are in the database (if I select them separately, it works).

Thanks

It should be OR instead of AND. AND would only return something if event_id was both 1 AND 2. OR returns something if event_id is 1 OR event_id is 2.

select nbs_contact_events.contact_id,
  nbs_contacts.nbs_contact_id,
  nbs_contacts.nbs_contact_sur
from nbs_contacts
left join nbs_contact_events
  on nbs_contact_events.contact_id = nbs_contacts.nbs_contact_id
where nbs_contact_events.event_id = 1
  or nbs_contact_events.event_id = 21