889560bdd87583493f33bf15ea147a41b44067e7 max Mon Mar 26 11:58:56 2012 -0700 add separators to pubs hgc, some minor comment changes in jksql diff --git src/hg/hgc/pubs.c src/hg/hgc/pubs.c index d466f85..aea3be7 100644 --- src/hg/hgc/pubs.c +++ src/hg/hgc/pubs.c @@ -71,31 +71,31 @@ char* nameListString = slNameListToString(names, ','); slNameFree(names); return nameListString; } static struct sqlResult* queryMarkerRows(struct sqlConnection* conn, char* markerTable, \ char* articleTable, char* item, int itemLimit, char* sectionList) /* query marker rows from mysql, based on http parameters */ { char query[4000]; /* Mysql specific setting to make the group_concat function return longer strings */ sqlUpdate(conn, "SET SESSION group_concat_max_len = 100000"); safef(query, sizeof(query), "SELECT distinct %s.articleId, url, title, authors, citation, pmid, " - "group_concat(snippet, section SEPARATOR ' (...) ') FROM %s " + "group_concat(snippet, concat(\" (section: \", section, \")\") SEPARATOR ' (...) ') FROM %s " "JOIN %s USING (articleId) " "WHERE markerId='%s' AND section in (%s) " "GROUP by articleId " "ORDER BY year DESC " "LIMIT %d", markerTable, markerTable, articleTable, item, sectionList, itemLimit); if (pubsDebug) printf("%s", query); struct sqlResult *sr = sqlGetResult(conn, query); return sr; }