Replace the biblio_db_search function with the following:

--------------------------------------------------------------------------------------------------------------
function biblio_db_search() {
global $user;
$inline = false;
$join = array();
  $join[] = "left join {biblio} b  on n.vid=b.vid";
   if (variable_get('biblio_view_only_own', 0) ){
      $limit .= " AND n.uid=$user->uid ";
   }

  $pager_attrib = array("sort" => variable_get('biblio_sort', 'year'), 'order' => variable_get('biblio_order', 'DESC'));
  $limits = null;

  if (isset($_GET['order'])){
    $pager_attrib['order'] = ($_GET['order'] == 'desc') ? 'desc' : 'asc';
  }
  if (isset($_GET['sort'])) {
    $pager_attrib['sort'] = check_plain($_GET['sort']);
  } 

  switch ($pager_attrib['sort']) {
    case 'type':
      $sortby = "ORDER BY b.biblio_type %s, b.biblio_year DESC, SUBSTRING(n.title,1,1) ASC ";
      break;
    case 'title':
      $sortby = "ORDER BY SUBSTRING(n.title,1,1) %s, b.biblio_year DESC ";
      break;
    case 'author':
      /*$join[] = "inner join {biblio_has_author} as ha on a.aid = ha.aid"; 
      $join[] = "inner join  {biblio_author_index} as a on b.nid= ha.nid";
      $sortby = " ORDER BY a.author %s ";
      $where[] = "ha.rank = 1 ";
      */
      $sortby = "ORDER BY SUBSTRING(LTRIM(b.biblio_authors),1,1) %s, b.biblio_year DESC ";
      break;
    case 'year':
    default:
      $sortby = "ORDER BY b.biblio_year %s, b.biblio_date DESC, SUBSTRING(n.title,1,1) ASC, b.biblio_type ASC ";
  } //end switch
  if (!isset($_SESSION['biblio_filter']) || !is_array($_SESSION['biblio_filter'])) {
    $_SESSION['biblio_filter'] = array();
  } 

  $session = &$_SESSION['biblio_filter'];
  
  $numargs = func_num_args();
  $arg_list = func_get_args();

  foreach ($session as $filter) {
    $arg_list = array_merge($arg_list, $filter);
  } 
  if (count($arg_list) >= 2) {
    $args = array();
    while ($arg_list) {
      $type = $arg_list[0];
      array_shift($arg_list);
      $operator = ($operator)?$operator:" AND "; //defaults to AND
      switch ($type) {
        case 'and':
          $operator = " AND ";
          $where[] = "and";
          break;
        case 'or':
          $operator = " OR ";
          $where[] = "or";
          break;
        case 'inline':
          $inline = true;
          break;
        case 'term':
        case 'term_id':
          $term = explode("?",$arg_list[0]);
          array_shift($arg_list);
          $join[] = "inner join {term_node} as tn on n.nid = tn.nid";
          if ($type == 'term'){
            $join[] = "inner join  {term_data} as td on tn.tid= td.tid";
            $where[] = "td.name = '%s' ";
          }elseif ($type == 'term_id'){
            $where[] = "tn.tid = '%d' ";          
          }  
          $terms[] = db_escape_string($term[0]);
          array_push($args, $type, $term[0]);
          break;
        case 'author':
          $term = explode("?",$arg_list[0]);
          array_shift($arg_list);
          //$limit .= $operator."MATCH(b.biblio_authors) AGAINST('%s'  IN BOOLEAN MODE)";
          $where[] = "(b.biblio_authors) RLIKE '%s' ";
          $terms[] = db_escape_string($term[0]);
          array_push($args, $type, $term[0]);
          $operator = NULL;
          break;
        case 'publisher':
          $term = explode("?",$arg_list[0]);
          array_shift($arg_list);
          //$limit .= $operator."MATCH(b.biblio_publisher) AGAINST('%s'  IN BOOLEAN MODE)";
          $where[] = "{b.biblio_publisher} RLIKE '%s' ";
          $terms[] = db_escape_string($term[0]);
          array_push($args, $type, $term[0]);
          $operator = NULL;
          break;
        case 'year':
          $term = db_escape_string($arg_list[0]);
          array_shift($arg_list);
          $where[] = "b.biblio_year=%d ";
          //$limit .= " AND b.biblio_year=%d ";
          $terms[] = (int)$term;
          array_push($args, $type, (int)$term);
          $operator = NULL;
          break;
        case 'keyword':
          $term = explode("?",$arg_list[0]);
          array_shift($arg_list);
          //$limit .= $operator."MATCH(b.biblio_keywords) AGAINST('%s'  IN BOOLEAN MODE)";
          $where[] = "{b.biblio_keywords} RLIKE '%s' ";
          $terms[] = db_escape_string($term[0]);
          array_push($args, $type, $term[0]);
          $operator = NULL;
          break;
        case 'type':
          $term = db_escape_string($arg_list[0]);
          array_shift($arg_list);
          $limit .= $operator. "b.biblio_type=%d ";
          $terms[] = (int)$term;
          array_push($args, $type, (int)$term);
          $operator = NULL;
          break;
        case 'order':
          $term = (db_escape_string($arg_list[0]) == 'desc')?'desc':'asc';
          array_shift($arg_list);
          $pager_attrib['order'] = $term;
          array_push($args, $type, $term);
          break;
        case 'sort':
          $term = db_escape_string($arg_list[0]);
          array_shift($arg_list);
          $pager_attrib['sort'] = $term;
          array_push($args, $type, $term);
          switch ($term) {
            case 'type':
              $sortby = "ORDER BY b.biblio_type %s, b.biblio_year DESC, SUBSTRING(n.title,1,1) ASC ";
              break;
            case 'title':
              $sortby = "ORDER BY SUBSTRING(n.title,1,1) %s, b.biblio_year DESC ";
              break;
            case 'year':
            default:
              $sortby = "ORDER BY b.biblio_year %s, SUBSTRING(n.title,1,1) ASC, b.biblio_type ASC ";
          } //end switch
          break;
      } 
    } 
  } 
  $where[] = "n.type='biblio' ";
  if ($user->uid > 1) {
    $where[] = 'n.status = 1 ';
  }//show only published entries to everyone except admin
  
  $joins = implode(' ', $join);

  if (count($where) > 1) {
	$counter_orig = 0;
	$counter_tmp = -1; // this index points to the previous item
	$prev_clause = false; // if the previous item was a clause
	while ($counter_orig < count($where)) {
		if (strcmp($where[$counter_orig],"or") == 0) { // we have an OR operator
			$tmp_str = $where_tmp[$counter_tmp];
			if (strcmp($tmp_str,')') != 0) { // it was not the end of another OR group
				$where_tmp[$counter_tmp] = '(';
				$counter_tmp++;
				$where_tmp[$counter_tmp] = $tmp_str;
				$counter_tmp++;
				$where_tmp[$counter_tmp] = "or";
				$counter_tmp++;
				$counter_orig++; // increasing this index (i'm taking the next where clause)
				$where_tmp[$counter_tmp] = $where[$counter_orig];
				$counter_tmp++;
				$where_tmp[$counter_tmp] = ')';
				$prev_clause = true;
			} 
			else { // if was the end of an OR group the ) will be replaced with another OR
				$where_tmp[$counter_tmp] = "or";
				$counter_tmp++;
				$counter_orig++; // increasing this index (i'm taking the next where clause)
				$where_tmp[$counter_tmp] = $where[$counter_orig];
				$counter_tmp++;
				$where_tmp[$counter_tmp] = ')';
				$prev_clause = true;
				// $counter_tmp++; now is not needed because we want that this index points to ")"
			}
		} 
		else { // we have an AND operator or a where clause
			if ($prev_clause == true) { // before we have a clause and not an operator AND or OR
				$where_tmp[] = "and";
				$counter_tmp++;
				$prev_clause = false;
			}
			$where_tmp[] = $where[$counter_orig];
			$counter_tmp++;
			if (strcmp($where[$counter_orig],"and") == 0) {
				$prev_clause = false;
			} else {
				$prev_clause = true;
			}
		}
		$counter_orig++;
	}
	$where_clause = '('. implode(' ', $where_tmp) .')';
  } else { $where_clause = $where[0];}


  $query = "SELECT * FROM {node} n $joins  WHERE $where_clause $published $limit $sortby ";
  //echo $query; die;
  $_SESSION['last_biblio_query'] = $query;
  $terms[] = $pager_attrib['order'];
  $_SESSION['last_biblio_query_terms'] = $terms;

  $result = pager_query(db_rewrite_sql($query), variable_get('biblio_rowsperpage', 25),0,null,$terms);

  biblio_show_results($result, $pager_attrib, $args,$inline);
} 