7e88d971aeed23ac14b271ba65bbc2d0514d0378 galt Tue Jan 30 01:19:50 2018 -0800 little cleanup. diff --git src/hg/lib/genePix.c src/hg/lib/genePix.c index 5332874..6ab6cbb 100644 --- src/hg/lib/genePix.c +++ src/hg/lib/genePix.c @@ -331,33 +331,33 @@ dyStringClear(dy); sqlDyStringPrintf(dy, "select gene from geneSynonym where name "); appendMatchHow(dy, name, how); sr = sqlGetResult(conn, dy->string); while ((row = sqlNextRow(sr)) != NULL) { geneEl = slNameNew(row[0]); slAddHead(&geneList, geneEl); } slReverse(&geneList); sqlFreeResult(&sr); for (geneEl = geneList; geneEl != NULL; geneEl = geneEl->next) { dyStringClear(dy); - sqlDyStringAppend(dy, "select imageProbe.image from probe,imageProbe"); + sqlDyStringPrintf(dy, "select imageProbe.image from probe,imageProbe"); sqlDyStringPrintf(dy, " where probe.gene = '%s' ", geneEl->name); - sqlDyStringAppend(dy, " and probe.id = imageProbe.probe"); + sqlDyStringPrintf(dy, " and probe.id = imageProbe.probe"); sr = sqlGetResult(conn, dy->string); while ((row = sqlNextRow(sr)) != NULL) { char *ids = row[0]; if (!hashLookup(uniqHash, ids)) { hashAdd(uniqHash, ids, NULL); imageEl = slIntNew(sqlUnsigned(ids)); slAddHead(&imageList, imageEl); } } sqlFreeResult(&sr); } dyStringFree(&dy); hashFree(&uniqHash); @@ -429,36 +429,36 @@ boolean endIsEmbryo, double endAge) /* Return selected genes according to a number of criteria. */ { struct slInt *imageList = NULL, *el; struct sqlResult *sr; struct dyString *dy = dyStringNew(0); char **row; boolean needAnd = FALSE; if (init == NULL && taxon == 0 && contributors == NULL && startIsEmbryo == TRUE && startAge == 0.0 && endIsEmbryo == FALSE && endAge >= genePixMaxAge) errAbort("must select something on genePixSelectMulti"); if (contributors) { - sqlDyStringAppend(dy, "select image.id from "); + sqlDyStringPrintf(dy, "select image.id from "); dyStringAppend(dy, "image,imageFile,submissionSet,submissionContributor,contributor"); } else { - sqlDyStringAppend(dy, "select id from image"); + sqlDyStringPrintf(dy, "select id from image"); } dyStringAppend(dy, " where"); if (taxon != 0) { dyStringPrintf(dy, " taxon=%d", taxon); needAnd = TRUE; } if (startAge > 0.0 || !startIsEmbryo) { if (needAnd) dyStringAppend(dy, " and"); if (startIsEmbryo) dyStringPrintf(dy, " (image.age >= %f or !image.isEmbryo)", startAge); else dyStringPrintf(dy, " (image.age >= %f and !image.isEmbryo)", startAge); needAnd = TRUE;