Properly combine (now removed) $search_db and $where into new $where