You are here

function biblio_admin_get_query in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.admin.inc \biblio_admin_get_query()
  2. 6 biblio.admin.inc \biblio_admin_get_query()
  3. 7.2 includes/biblio.admin.inc \biblio_admin_get_query()

Parameters

$name:

Return value

string

File

includes/biblio.admin.inc, line 1954
biblio.admin.inc

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;
  }
}