I need to make an query where I only display results in one condition:
# Search the Database
$select_sql = "SELECT * FROM users WHERE user LIKE :search OR date_access LIKE :search OR ip LIKE :search AND active LIKE :active ORDER BY id DESC";
$select_db = $connect->prepare($select_sql);
$select_db->bindValue(':search', "%{$search_user}%");
$select_db->bindValue(':active', "yes");
$select_db->execute();
However, in the above way it did not work, it normally displays the data according to the search, but it also displays data that is not of the same parameter (users that are not active).