getMessage()); } $sql_criteria = $biblio_list->setSQLcriteria($q); // cluster by GMD $gmd_cluster_q = $dbs->query('SELECT TRIM(gmd) AS `Cluster Name`, COUNT(biblio_id) AS `Cluster Count` FROM search_biblio AS `index` ' .( $sql_criteria['sql_criteria']?' WHERE '.$sql_criteria['sql_criteria']:'' ).' GROUP BY `Cluster Name` LIMIT '.$cluster_limit); if ($gmd_cluster_q->num_rows > 0) { echo '

'.__('GMD').'

'."\n"; echo ''."\n"; } // cluster by Collection type $coll_type_cluster_q = $dbs->query('SELECT TRIM(collection_types) AS `Cluster Name`, COUNT(biblio_id) AS `Cluster Count` FROM search_biblio AS `index` ' .( $sql_criteria['sql_criteria']?' WHERE '.$sql_criteria['sql_criteria']:'' ).' GROUP BY `Cluster Name` LIMIT '.$cluster_limit); if ($coll_type_cluster_q->num_rows > 0) { echo '

'.__('Collection Type').'

'."\n"; echo ''."\n"; } // cluster by subject $subj_cluster_q = $dbs->query('SELECT TRIM(topic) AS `Cluster Name`, COUNT(biblio_id) AS `Cluster Count` FROM search_biblio AS `index` ' .( $sql_criteria['sql_criteria']?' WHERE '.$sql_criteria['sql_criteria']:'' ).' GROUP BY `Cluster Name` LIMIT '.$cluster_limit); if ($subj_cluster_q->num_rows > 0) { echo '

'.__('Subject(s)').'

'."\n"; echo ''."\n"; } // cluster by author $auth_cluster_q = $dbs->query('SELECT TRIM(author) AS `Cluster Name`, COUNT(biblio_id) AS `Cluster Count` FROM search_biblio AS `index` ' .( $sql_criteria['sql_criteria']?' WHERE '.$sql_criteria['sql_criteria']:'' ).' GROUP BY `Cluster Name` LIMIT '.$cluster_limit); if ($auth_cluster_q->num_rows > 0) { echo '

'.__('Author(s)').'

'."\n"; echo ''."\n"; } } ?>