Index: /trunk/glueforge/templates/psdb/header.tt
===================================================================
--- /trunk/glueforge/templates/psdb/header.tt	(revision 3918)
+++ /trunk/glueforge/templates/psdb/header.tt	(revision 3919)
@@ -22,4 +22,5 @@
 [% INCLUDE insertfits_h.tt %]
 [% INCLUDE popfits_h.tt %]
+[% INCLUDE selectrowsfits_h.tt %]
 
 /// @}
Index: /trunk/glueforge/templates/psdb/selectrowsfits_h.tt
===================================================================
--- /trunk/glueforge/templates/psdb/selectrowsfits_h.tt	(revision 3919)
+++ /trunk/glueforge/templates/psdb/selectrowsfits_h.tt	(revision 3919)
@@ -0,0 +1,16 @@
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool [% namespace %]SelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits               ///< psFits object
+    psMetadata      *where,             ///< Row match criteria
+    const psU64     limit               ///< Maximum number of elements to return
+);
