Index: /trunk/psLib/pslib.kdevses
===================================================================
--- /trunk/psLib/pslib.kdevses	(revision 4611)
+++ /trunk/psLib/pslib.kdevses	(revision 4612)
@@ -3,15 +3,15 @@
 <KDevPrjSession>
  <DocsAndViews NumberOfDocuments="4" >
-  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/math/psMinimize.h" >
-   <View0 line="74" Type="Source" />
+  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/db/psDB.h" >
+   <View0 Type="Source" />
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/math/psMinimize.c" >
-   <View0 line="1568" Type="Source" />
+  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/db/psDB.c" >
+   <View0 Type="Source" />
   </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/imageops/psImageGeomManip.h" >
-   <View0 line="145" Type="Source" />
+  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/sys/psString.h" >
+   <View0 Type="Source" />
   </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/imageops/psImageGeomManip.c" >
-   <View0 line="690" Type="Source" />
+  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/new/psLib/src/sys/psString.c" >
+   <View0 line="83" Type="Source" />
   </Doc3>
  </DocsAndViews>
Index: /trunk/psLib/src/db/psDB.c
===================================================================
--- /trunk/psLib/src/db/psDB.c	(revision 4611)
+++ /trunk/psLib/src/db/psDB.c	(revision 4612)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-21 01:40:10 $
+ *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-26 20:00:57 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -853,6 +853,10 @@
 
 bool p_psDBRunQuery(psDB *dbh,
-                    const char *format)
-{
+                    const char *format,
+                    ...)
+{
+    va_list argPtr;
+    char *dest = NULL;
+
     // Verify database object is not NULL
     if(dbh == NULL) {
@@ -862,9 +866,20 @@
 
     // Run query
-    if (mysql_real_query(dbh->mysql, format, (unsigned long)strlen(format)) !=0) {
+    va_start(argPtr, format);
+    if(argPtr == NULL) {
+        dest=psStringCopy(format);
+    } else {
+        int destSize = vsnprintf(dest, 0, format, argPtr);
+        dest = psAlloc(destSize+1);
+        vsnprintf(dest, destSize+1, format, argPtr);
+    }
+    va_end(argPtr);
+    if (mysql_real_query(dbh->mysql, dest, (unsigned long)strlen(dest)) !=0) {
         psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysql_error(dbh->mysql));
+        psFree(dest);
         return false;
     }
 
+    psFree(dest);
     return true;
 }
Index: /trunk/psLib/src/db/psDB.h
===================================================================
--- /trunk/psLib/src/db/psDB.h	(revision 4611)
+++ /trunk/psLib/src/db/psDB.h	(revision 4612)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-21 01:40:10 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-26 20:00:57 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -92,5 +92,6 @@
 bool p_psDBRunQuery(
     psDB *dbh,                         ///< Database handle
-    const char *format                 ///< SQL string to execute
+    const char *format,                ///< SQL string to execute
+    ...                                ///< Arguments for name formatting and metadata item data.
 );
 
