8931ab6b05b124503660f86d60fe34a38266d716
max
  Fri May 29 06:53:20 2020 -0700
OMIM: not showing phenotype table when there are no phenotypes and add more spaces, refs #18419

diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index 1ad9a7a..2290b7b 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -2242,30 +2242,38 @@
 int sqlFieldColumn(struct sqlResult *sr, char *colName)
 /* get the column number of the specified field in the result, or
  * -1 if the result doesn't contain the field.*/
 {
 int numFields = mysql_num_fields(sr->result);
 int i;
 for (i = 0; i < numFields; i++)
     {
     MYSQL_FIELD *field = mysql_fetch_field_direct(sr->result, i);
     if (sameString(field->name, colName))
         return i;
     }
 return -1;
 }
 
+int sqlCountRows(struct sqlResult *sr)
+/* From a sqlResult that was obtained with sqlStoreResult, return the number of rows */
+{
+if(sr != NULL)
+    return mysql_num_rows(sr->result);
+return 0;
+}
+
 int sqlCountColumns(struct sqlResult *sr)
 /* Count the number of columns in result. */
 {
 if(sr != NULL)
     return mysql_field_count(sr->conn->conn);
 return 0;
 }
 
 int sqlFieldCount(struct sqlResult *sr)
 /* Return number of fields in a row of result. */
 {
 if (sr == NULL)
     return 0;
 return mysql_num_fields(sr->result);
 }