a7fe975e8043bf200c1282b6261766d0e07f8482 max Thu Sep 13 16:12:53 2012 -0700 fix to (chrom,start,end)-check diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 0cee2ab..01d7be5 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -893,45 +893,45 @@ safef(query, 1024, "SHOW COLUMNS FROM `%s` LIKE '%s'", tableName, column); char buf[1024]; char *ret = sqlQuickQuery(conn, query, buf, 1024); return (ret!=NULL); } void printItemDetailsHtml(struct trackDb *tdb, char *itemName) /* if track has an itemDetailsHtml, retrieve and print the HTML */ { char *tableName = trackDbSetting(tdb, "itemDetailsHtmlTable"); if (tableName != NULL) { struct sqlConnection *conn = hAllocConn(database); struct itemDetailsHtml *html, *htmls; if (columnExists(conn, tableName, "chrom")) - htmls = sqlQueryObjs(conn, (sqlLoadFunc)itemDetailsHtmlLoad, sqlQueryMulti, - "select name, html from %s where name = '%s'", tableName, itemName); - else { char *chrom = cgiString("c"); int start = cgiInt("o"); int end = cgiInt("t"); htmls = sqlQueryObjs(conn, (sqlLoadFunc)itemDetailsHtmlLoad, sqlQueryMulti, "select name, html from %s where \ name = '%s' and \ chrom = '%s' and \ start = '%d' and \ end = '%d'", tableName, itemName, chrom, start, end); } + else + htmls = sqlQueryObjs(conn, (sqlLoadFunc)itemDetailsHtmlLoad, sqlQueryMulti, + "select name, html from %s where name = '%s'", tableName, itemName); for (html = htmls; html != NULL; html = html->next) printf("
\n%s\n", html->html); itemDetailsHtmlFreeList(&htmls); hFreeConn(&conn); } } char *getIdInUrl(struct trackDb *tdb, char *itemName) /* If we have an idInUrlSql tag, look up itemName in that, else just * return itemName. */ { char *sql = trackDbSetting(tdb, "idInUrlSql"); char *id = itemName; if (sql != NULL)