function biblio_admin_get_query in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.admin.inc \biblio_admin_get_query()
- 7 includes/biblio.admin.inc \biblio_admin_get_query()
- 7.2 includes/biblio.admin.inc \biblio_admin_get_query()
File
- ./
biblio.admin.inc, line 1521
Code
function biblio_admin_get_query($name) {
switch ($name) {
case "author_dup":
return 'SELECT lastname, firstname, initials, COUNT(lastname) as cnt FROM {biblio_contributor_data} GROUP BY lastname, firstname, initials HAVING COUNT(*)>1 ORDER BY lastname ASC, firstname ASC, initials ASC ';
break;
case "author_by_name":
return "SELECT lastname, cid FROM {biblio_contributor_data} where lastname LIKE '%s'";
break;
case 'author_pub_count':
// return ('SELECT bd.lastname, b.cid,COUNT(*) AS cnt FROM {biblio_contributor} b, {biblio_contributor_data} bd WHERE bd.cid=b.cid GROUP BY b.cid HAVING cnt > 0 ORDER BY lastname ASC');
return 'SELECT bd.lastname, b.cid,COUNT(*) AS cnt FROM {biblio_contributor} b, {biblio_contributor_data} bd WHERE bd.cid=b.cid GROUP BY b.cid, bd.lastname HAVING COUNT(*) > 0 ORDER BY lastname ASC';
break;
}
}